Click here to Skip to main content
15,741,656 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Here's how! Pin
leon de boer24-Sep-16 7:37
leon de boer24-Sep-16 7:37 
GeneralRe: Here's how! Pin
Member 1118935724-Sep-16 10:52
Member 1118935724-Sep-16 10:52 
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 
im having a problem here.. my program always output Invalid Gender! after I input the gender and status..

#include stdio.h>
/*Ambus*/
int main()
{
char stat[10], gend[10];
int rCTR, mmCTR, fsCTR;
clrscr(); mmCTR = 0; fsCTR = 0;
for (rCTR = 1; rCTR <= 10; rCTR++)
{
JJ:printf("\n Record %d \n",rCTR);
printf("Input your gender:"); scanf("%s",&gend);
printf("Input your civil status:"); scanf("%s",&stat);
if(gend == "female")
{
if(stat == "single")
fsCTR++;
else if(stat == "married");
else
{
printf("Invalid civil status!");
goto JJ;
}
}
else if(gend == "male")
{
if(stat == "married")
mmCTR++;
else if(stat == "single");
else
{
printf("Invalid civil status!");
goto JJ;
}
}
else
{
printf("Invalid gender!");
goto JJ;
}
}
printf("Single females=%d, Married males=%d, Number of Records=%d.", mmCTR, fsCTR, rCTR-1);
return 0;
}
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 
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 

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.