49,761 Topics

Member Avatar for
Member Avatar for Dejai

Hello everyone this is my first post on this forum... Though I am a member of several. Just thought I would share some information with all the people out there who want to know more about c++ game programming. Firstly if you want to make graphical games you need something …

Member Avatar for jbennet
0
93
Member Avatar for bops

hey, how would i go about converting a char* character array to a double. I would like to create a function that takes a char array as a parameter such as "1234.1" and then return that as a double value 1234.1. Is there a function that would allow me to …

Member Avatar for Narue
0
236
Member Avatar for ongxizhe

I have two questions to ask. Firstly, I would lke to know is C++ GUI the same as C++.NET or there isn't such thing as C++.NET? Secondly, although you won't suggest me to learn C++.NET and you would ask me to learn C#, but I'm will still be asking for …

Member Avatar for ongxizhe
0
157
Member Avatar for ongxizhe

How to link Buttons in C++.NET? Example: If I want to link "Button1" which is in "Form1" to "Form2", like if you click "Button1" in "Form1", the program will goto "Form2". What source code should I input?

Member Avatar for ongxizhe
0
247
Member Avatar for lotsofsloths

Ok so here is my code for a practice homework at LiduidEmberS [CODE] #include <iostream> using namespace std; int main(void) { int a; int b; int c; int d; int radius; int volumeprism; volumeprism = b*c*d; int volumesphere = 1.3333333333333*3.1415926536*(radius^3); cout << "Welcome to the program!\n\n"; cout << "Do you …

Member Avatar for ndeniche
0
146
Member Avatar for pntkiran

Hi all, I parse HTTP request(using post method) coming from client.file can be either of binary or base64 encoded.I need to process them differently for each case. (if(binary type) call method1(); else call decode(); // and then call method1())) How will I come to know which kind of encoding method …

Member Avatar for Mushy-pea
0
97
Member Avatar for Matt Tacular

I am trying to make a text version of risk, and I need to store the population, or army count, for each country. So the only way I could think to do that, as you'll see in my code, is by making a variable for each country, and then storing …

Member Avatar for ~s.o.s~
0
84
Member Avatar for Matt Tacular

How do you initialize an STL list with the values when you declare it? That way I don't have to add the values later with a loop and push_back. Thanks, -Matt

Member Avatar for iamthwee
0
256
Member Avatar for ptimoor
Member Avatar for ~s.o.s~
0
73
Member Avatar for Lutzee

Hi there everyone. I wonder if you could help me with my code. It just seems to go into an infinite loop. I would greatly appreciate some help with this. Thanks [CODE]#include<iostream> using namespace std; int qsrt(int array[], int first, int last) { int over = 0; over = first-last; …

Member Avatar for ndeniche
0
95
Member Avatar for tlee

Hi all, Could anyone help me about returning the array from a function? I believe that it is a syntax error (compile time error) to return an array from a function, but one book mentions briefly that using pointer will solve the issue. However, my current knowledge does not allow …

Member Avatar for Ancient Dragon
3
2K
Member Avatar for dougy83

Hi everyone, I'm a newbie here, and have a newbie question. I'm trying to get a popup menu to show just above my system tray icon/notifyIcon. I'm using TrackPopupMenuEx to display the menu, loaded from my application. The problem is that menu is displayed as a really thin menu, so …

Member Avatar for dougy83
0
136
Member Avatar for sadaka

Hello, I'm a new programmer and wanted to create a simple windows application. I might be getting in a little over my head when writing the code below. All seems well when compiling the code without implementing classes. When I implemented the class AppEngine from a separate source file I …

Member Avatar for sadaka
0
163
Member Avatar for flavour_of_bru

Hi all, Can you please tell me how to read .csv files in C++/VC++?? I converted my excel files to .csv files in order to make reading easy. Need help regarding the code. Thanks Rishi.

Member Avatar for flavour_of_bru
0
129
Member Avatar for bops

Hey, I'm getting a errors from Dev-C++ (Windows XP Professional) about IPN_FIELDCHANGED and NMIPADDRESS.. it appears that they are both not recognised [code] In function `LRESULT WndProc(HWND__*, UINT, WPARAM, LPARAM)': `IPN_FIELDCHANGED' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) `NMIPADDRESS' …

Member Avatar for Ancient Dragon
0
350
Member Avatar for Matt Tacular

I'm having some trouble with STL lists. What I want to do in my program is take the players initial and put it into an array at the spot that they got from when I divided up 20 numbers (0-19). Can anyone tell me why line 151 (in this post …

Member Avatar for Matt Tacular
0
100
Member Avatar for Matt Tacular

I'm wondering why it prints so many spaces when I only ask it to print one. Here's the code: [code=cplusplus]#include <iostream> #include <string> using namespace std; string ar[21] = " "; int main() { ar[3] = "M"; ar[4] = "n"; for(unsigned int i=0 ; i<20 ; i++) { cout << …

Member Avatar for ~s.o.s~
0
135
Member Avatar for meiyantao

Hi,sir,please look at this code. [code] #include <iostream> using namespace std; class A{ private: class B; public: int out(int x){ return outB(x)->a; } B * outB(int x); private: B* root; class B{ int a; B(int init_a) :a(init_a){} friend class A; }; }; A::B* A::outB(int x){ root = new B(x); return …

Member Avatar for meiyantao
0
177
Member Avatar for shouvik.d

I want to write a parser for C++ which can extract methods and members pertaining to a particular class(es) in a CPP file. I used Parser Generattor tool by BumbleBee softwares and did all the project settings as required by them but still keep on getting fatal errors in Exception …

Member Avatar for iamthwee
0
191
Member Avatar for ongxizhe

Can someone post the specific [B]video tutorials[/B] URLs for - C++ - C# - J# from [URL]http://msdn.com/[/URL] ? Cause I'm having some problems finding them. [B]Or[/B] Anyone knows other site which have video tutorials, or even text tutorials, please kindly post the URL links. Your help will be appreciated. Thanks.

Member Avatar for ongxizhe
0
108
Member Avatar for Matt Tacular

I had a thread going not too long ago, and from that I was able to make a global vector that I can store class objects in. But now when I try to access it, it says "no match for 'operator[]' in 'jailHouse[0]' " Anyways, Here's the code, if you …

Member Avatar for Matt Tacular
0
130
Member Avatar for jaepi

Hello there, just a question, what do you think is the purpose of this flag to this block of code... [code=c++] void CDriveControl::Trace(bool bAt, char *lpszFormat, ...) { #ifdef _DEBUG va_list args; va_start(args, lpszFormat); printf(lpszFormat, args); if( bAt) { fflush( stdout); } va_end(args); #endif } [/code] I've been wondering, why …

Member Avatar for jaepi
0
197
Member Avatar for meiyantao

This codeblock comes from Mr Weiss's book "Data Sturucture and Algorithm Analysis in C++"(Third Edition). I have some questions about it. [code=c] /** *This is a member function from the BinarySearchTree class. *And It try to find whether there's a element equal to x in *the binary search tree. */ …

Member Avatar for WolfPack
0
172
Member Avatar for bops

How would you colour a control, for example colour the background of a button control to Black and the text of the button control to white... [CODE] HWND hButton = CreateWindowEx(0,"BUTTON","&Send",WS_VISIBLE | WS_CHILD,230,100,70,20,hwnd,(HMENU)cmdBUTTON,0,0); if ( hButton == NULL ) { MessageBox(hwnd,"Error: button could not be created","Error",0); } /*Change the colour …

Member Avatar for vijayan121
0
211
Member Avatar for alex130

Hi, I'm using windows XP and trying to simulate mouse movement and mouse clicks. The following code supposed to move mouse to absolute position (100,100) and perform a click: //test.cpp file: [CODE]#include "stdafx.h" int main(int argc, char* argv[]){ INPUT *buffer = new INPUT[3]; //allocate a buffer buffer->type = INPUT_MOUSE; buffer->mi.dx …

Member Avatar for uglinho
0
5K
Member Avatar for Matt Tacular

How can I make a pointer to an array? So that I access the members of the array by using the pointer in a seperate function. I'm wondering because I have an array I have to access in functions other than the one it was defined in, but I need …

Member Avatar for Matt Tacular
0
328
Member Avatar for jaepi

Hello there, I've encountered a syntax in one of the examples I'm studying. [code=c++] *pStatus = *pStatus | DC_ST_DISK_IN | DC_ST_TRAYCLOSE | DC_ST_WRITING; //<--notice the "|" [/code] Is this a form of piping? Like in bash script in Linux which supports piping in there commands? uhmmm.. What does it imply, …

Member Avatar for jaepi
0
170
Member Avatar for blueskylvr7

ok so I'm very new at classes and don't quite understand them much so this may seem simple. What I have to do basically is write a program that takes in an angle (for example 149degree symbol34.8' W) and then prints it out on to the screen. I have to …

Member Avatar for thekashyap
0
94
Member Avatar for alembic21

Hello All, Here are the instructions for the program I am trying to write: > Write a program that determines which 2, 3, and 4 digit #'s are equal to the sum of the cubes of their digits. > Ex. > if the original # is 234, determine if (2 …

Member Avatar for ndeniche
0
133
Member Avatar for joesmithf1

Hi All, I have been pulling my hair out trying to figur out this problem. Please help!!! I just started C++ Thank you! Joe I need my output to look like this: The original vector v[] is: v[] = { 1.05 -2.55 1.75 1.10 -0.75 2.43 -3.55 4.19 1.45 -0.05 …

Member Avatar for ndeniche
0
59

The End.