Click here to Skip to main content
15,920,383 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Irene Pin
Andrew Kirillov14-May-05 10:40
Andrew Kirillov14-May-05 10:40 
GeneralWM_SHOWWINDOW Pin
SJFreeland14-May-05 9:53
SJFreeland14-May-05 9:53 
Generallearning to work with SDKs and source code... Pin
psasidisrcum14-May-05 9:35
psasidisrcum14-May-05 9:35 
GeneralRe: learning to work with SDKs and source code... Pin
jc0dex14-May-05 10:08
jc0dex14-May-05 10:08 
GeneralRe: learning to work with SDKs and source code... Pin
psasidisrcum14-May-05 15:41
psasidisrcum14-May-05 15:41 
GeneralRe: learning to work with SDKs and source code... Pin
jc0dex14-May-05 18:51
jc0dex14-May-05 18:51 
GeneralRe: learning to work with SDKs and source code... Pin
S Douglas14-May-05 19:50
professionalS Douglas14-May-05 19:50 
GeneralAccessing network disk drives Pin
Still learning how to code14-May-05 9:15
Still learning how to code14-May-05 9:15 
GeneralRe: Accessing network disk drives Pin
Still learning how to code15-May-05 8:56
Still learning how to code15-May-05 8:56 
GeneralRe: Accessing network disk drives Pin
David Crow15-May-05 16:36
David Crow15-May-05 16:36 
Generaldisconnect pipes Pin
includeh1014-May-05 8:37
includeh1014-May-05 8:37 
GeneralRe: disconnect pipes Pin
Anonymous14-May-05 9:33
Anonymous14-May-05 9:33 
GeneralRe: disconnect pipes Pin
includeh1014-May-05 10:55
includeh1014-May-05 10:55 
GeneralRe: disconnect pipes Pin
Anonymous14-May-05 9:35
Anonymous14-May-05 9:35 
GeneralFile Selection Pin
Lampros Giampouras14-May-05 5:40
Lampros Giampouras14-May-05 5:40 
GeneralRe: File Selection Pin
jc0dex14-May-05 8:51
jc0dex14-May-05 8:51 
GeneralRe: File Selection Pin
Graham Bradshaw14-May-05 13:39
Graham Bradshaw14-May-05 13:39 
GeneralRe: File Selection Pin
Lampros Giampouras15-May-05 1:05
Lampros Giampouras15-May-05 1:05 
QuestionWhat does this type defination mean? Pin
sacoskun14-May-05 4:34
sacoskun14-May-05 4:34 
AnswerRe: What does this type defination mean? Pin
peterchen14-May-05 23:14
peterchen14-May-05 23:14 
GeneralRe: What does this type defination mean? Pin
sacoskun15-May-05 4:31
sacoskun15-May-05 4:31 
GeneralMS Word Automation Pin
Imtiaz Murtaza14-May-05 2:36
Imtiaz Murtaza14-May-05 2:36 
GeneralClasses Pin
SuperTank14-May-05 1:49
SuperTank14-May-05 1:49 
Hi,
I´m trying to make a 1d array of classes but havent really got it working that good.

This is what I´ve done:

Enemy	**enemy;<br />
enemy = new Enemy*[2];<br />
enemy[0] = new Enemy(g_lpDDSBack, hInstance, g_pDD, 100, 0, 48, 48, NULL);<br />
enemy[1] = new Enemy(g_lpDDSBack, hInstance, g_pDD, 300, 0, 48, 48, NULL);<br />
<br />
ofstream fout;<br />
fout.open("output.txt");<br />
fout << enemy[0]->PrintDestX() << endl;<br />
fout << enemy[1]->PrintDestX() << endl;<br />
fout.close();


Obviously what I´m trying to do is to set enemy[0]´s DestX to 100 and enemy[1]´s DestX to 300.
The thing is, when I´m printing out both enemies DestX both says 300.

What am I doing wrong, or should do diffrent?

Thanks. Smile | :)
GeneralRe: Classes Pin
Ravi Bhavnani14-May-05 4:07
professionalRavi Bhavnani14-May-05 4:07 
GeneralRe: Classes Pin
SuperTank14-May-05 11:55
SuperTank14-May-05 11:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.