Sorry if I am being confusing.
Let's say
Code:
void GetSex(){
int input=0,count=0,input2=0;
do{
if(count==1)
cout<<"Please enter a correct input...\n\n";
cout<<"Enter your sex...\n";
cout<<"-----------------\n";
cout<<"1.Male\n";
cout<<"2.Female\n";
cin>>input;
if(!cin.good()){
cin.clear();
cin.ignore();
}
count=1;
system("cls");
}while(input!=1 && input!=2);
switch(input){
case 1:
count=0;
cin.ignore();
do{
if(count==1)
cout<<"Enter a correct input...\n";
cout<<"You have entereed Male, are you sure?\n";
cout<<"1.Yes 2. No\n";
cin>>input2;
if(!cin.good()){
cin.clear();
cin.ignore();
}
count=1;
system("cls");
}while(input2!=1 && input2!=2);
switch(input2){
case 1:
system("cls");
break;
case 2:
system("cls");
cout<<"Select again...\n";
GetSex();
break;
}
break;
case 2:
count=0;
do{
if(count==1)
cout<<"Enter a correct input...\n";
cout<<"You have entereed Female, are you sure?\n";
cout<<"1.Yes 2. No\n";
cin>>input2;
if(!cin.good()){
cin.clear();
cin.ignore();
}
count=1;
system("cls");
}while(input2!=1 && input2!=2);
switch(input2){
case 1:
system("cls");
break;
case 2:
system("cls");
cout<<"Select again...\n";
GetSex();
break;
}
break;
}
So when user enters"1 1 1"
It will skip through and input the other 'ones' into the cin statements.
Sorry if I'm unclear.