Click here to Skip to main content
16,005,734 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A simple C question Pin
b_girl24-Nov-03 8:11
b_girl24-Nov-03 8:11 
GeneralRe: A simple C question Pin
John M. Drescher24-Nov-03 7:59
John M. Drescher24-Nov-03 7:59 
GeneralRe: A simple C question Pin
noahsarf24-Nov-03 8:11
noahsarf24-Nov-03 8:11 
GeneralRe: A simple C question Pin
b_girl24-Nov-03 8:22
b_girl24-Nov-03 8:22 
GeneralRe: A simple C question Pin
Rick York24-Nov-03 8:25
mveRick York24-Nov-03 8:25 
GeneralRe: A simple C question Pin
Jesse Evans24-Nov-03 8:23
Jesse Evans24-Nov-03 8:23 
GeneralRe: A simple C question Pin
b_girl24-Nov-03 8:27
b_girl24-Nov-03 8:27 
GeneralRe: A simple C question Pin
John R. Shaw24-Nov-03 17:37
John R. Shaw24-Nov-03 17:37 
This is C++:
int *suit[4];
for(int p = 0; p <= 3; p++)
{
	suit[p] = &p;
}


This is C:
int *suit[4];
int p;
for(p = 0; p <= 3; p++)
{
	suit[p] = &p;
}


This is what I think your are trying to do since what you are doing makes no since:
int suit[4];
int p;
for(p = 0; p <= 3; p++)
{
	suit[p] = p;
}


One last note: Get out of the habit for writing p++ when not neccessary, use ++p instead. When your friend graduates from C to C++ it will eventualy save her a lot of head acks, because post increment can lead to a great deal of unexpected over head when using user define data types.

INTP
GeneralTrig and Calculus Functions in C++ Pin
Trurl_24-Nov-03 7:04
Trurl_24-Nov-03 7:04 
GeneralRe: Trig and Calculus Functions in C++ Pin
John M. Drescher24-Nov-03 7:08
John M. Drescher24-Nov-03 7:08 
GeneralRe: Trig and Calculus Functions in C++ Pin
John R. Shaw24-Nov-03 17:45
John R. Shaw24-Nov-03 17:45 
GeneralRe: Trig and Calculus Functions in C++ Pin
Trurl_25-Nov-03 6:42
Trurl_25-Nov-03 6:42 
GeneralRe: Trig and Calculus Functions in C++ Pin
John R. Shaw25-Nov-03 8:37
John R. Shaw25-Nov-03 8:37 
Questionhow to open a listening port using MFC Pin
Dhakad24-Nov-03 6:51
Dhakad24-Nov-03 6:51 
AnswerRe: how to open a listening port using MFC Pin
Ernesto D.24-Nov-03 9:32
Ernesto D.24-Nov-03 9:32 
AnswerRe: how to open a listening port using MFC Pin
BaldwinMartin24-Nov-03 14:52
BaldwinMartin24-Nov-03 14:52 
GeneralRe: how to open a listening port using MFC Pin
Dhakad24-Nov-03 20:52
Dhakad24-Nov-03 20:52 
GeneralRe: how to open a listening port using MFC Pin
BaldwinMartin24-Nov-03 21:00
BaldwinMartin24-Nov-03 21:00 
Generalvc++ 2003 IDE is driving me crazy Pin
DiWa24-Nov-03 6:47
DiWa24-Nov-03 6:47 
GeneralRe: vc++ 2003 IDE is driving me crazy Pin
Joe Woodbury24-Nov-03 8:14
professionalJoe Woodbury24-Nov-03 8:14 
GeneralRe: vc++ 2003 IDE is driving me crazy Pin
DiWa24-Nov-03 10:42
DiWa24-Nov-03 10:42 
GeneralRe: vc++ 2003 IDE is driving me crazy Pin
Ernesto D.24-Nov-03 9:00
Ernesto D.24-Nov-03 9:00 
GeneralRe: vc++ 2003 IDE is driving me crazy Pin
DiWa24-Nov-03 10:49
DiWa24-Nov-03 10:49 
GeneralRe: vc++ 2003 IDE is driving me crazy Pin
John R. Shaw24-Nov-03 17:52
John R. Shaw24-Nov-03 17:52 
GeneralWord Document Automation in MFC Pin
Andre123424-Nov-03 6:02
Andre123424-Nov-03 6:02 

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.