Click here to Skip to main content
15,887,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Here's how! Pin
leon de boer24-Sep-16 16:43
leon de boer24-Sep-16 16:43 
GeneralRe: Here's how! Pin
Member 1118935724-Sep-16 19:55
Member 1118935724-Sep-16 19:55 
GeneralRe: Here's how! Pin
Richard MacCutchan24-Sep-16 20:36
mveRichard MacCutchan24-Sep-16 20:36 
QuestionRe: Here's how! Pin
David Crow25-Sep-16 17:10
David Crow25-Sep-16 17:10 
GeneralRe: Here's how! Pin
Joe Woodbury24-Oct-16 14:40
professionalJoe Woodbury24-Oct-16 14:40 
Questionwhy "Invalid Gender!"? Pin
Ambus Dondon22-Sep-16 17:56
Ambus Dondon22-Sep-16 17:56 
AnswerRe: why "Invalid Gender!"? Pin
Richard MacCutchan22-Sep-16 20:41
mveRichard MacCutchan22-Sep-16 20:41 
AnswerRe: why "Invalid Gender!"? Pin
Jochen Arndt22-Sep-16 20:47
professionalJochen Arndt22-Sep-16 20:47 
You are comparing a character array (a pointer) with a pointer to a constant string:
if(gend == "female")

Those pointers will never be identical.

If you want to compare strings (the content pointed to by the pointers), you must compare each element (character) of the strings. There is the strcmp[^] C standard library function to do this:
if (!strcmp(gend, "female"))
Poke tongue | ;-P
GeneralRe: why "Invalid Gender!"? Pin
Ambus Dondon23-Sep-16 16:15
Ambus Dondon23-Sep-16 16:15 
AnswerRe: why "Invalid Gender!"? Pin
Victor Nijegorodov23-Sep-16 7:46
Victor Nijegorodov23-Sep-16 7:46 
GeneralRe: why "Invalid Gender!"? Pin
Ambus Dondon23-Sep-16 16:15
Ambus Dondon23-Sep-16 16:15 
QuestionWell wishing Pin
Shiv Prakash Gupt20-Sep-16 10:09
Shiv Prakash Gupt20-Sep-16 10:09 
Questionhow to use socket in Visual C++ 6.0 Pin
Member 1263579220-Sep-16 3:08
Member 1263579220-Sep-16 3:08 
AnswerRe: how to use socket in Visual C++ 6.0 Pin
NotPolitcallyCorrect20-Sep-16 3:27
NotPolitcallyCorrect20-Sep-16 3:27 
AnswerRe: how to use socket in Visual C++ 6.0 Pin
Victor Nijegorodov21-Sep-16 6:31
Victor Nijegorodov21-Sep-16 6:31 
QuestionIn C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
ranjithsubra20-Sep-16 2:43
professionalranjithsubra20-Sep-16 2:43 
AnswerRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
NotPolitcallyCorrect20-Sep-16 3:00
NotPolitcallyCorrect20-Sep-16 3:00 
GeneralRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
ranjithsubra20-Sep-16 3:09
professionalranjithsubra20-Sep-16 3:09 
GeneralRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
NotPolitcallyCorrect20-Sep-16 3:26
NotPolitcallyCorrect20-Sep-16 3:26 
GeneralRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
ranjithsubra20-Sep-16 3:33
professionalranjithsubra20-Sep-16 3:33 
AnswerRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
David Crow20-Sep-16 5:22
David Crow20-Sep-16 5:22 
GeneralRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
Krishnakumartg20-Sep-16 22:13
Krishnakumartg20-Sep-16 22:13 
AnswerRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
jeron120-Sep-16 5:23
jeron120-Sep-16 5:23 
AnswerRe: In C++ compiler providing the default copy constructor ,then why do we need copy constructor Pin
Saravanan Sundaresan24-Sep-16 19:53
professionalSaravanan Sundaresan24-Sep-16 19:53 
QuestionRight method of swapping arrays and classes using pointers Pin
Javier Luis Lopez19-Sep-16 21:35
Javier Luis Lopez19-Sep-16 21:35 

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.