Dudearoo
Useing Code::Blocks
Hey you guys.
ive got a problem, ive got a simple while loop being executed that loops 41 lines of code untill the user types no
for example
int repeat = 2;
while (repeat == 2)
{
// my code
// || Example Code
// \/
cout << " yes or no" << endl;
cin.getline(teamnamesquestion, 5);
if (teamnamesquestion == "no" || teamnamesquestion == "No" || teamnamesquestion == "NO")
{
// BLANK or have repeat = 2; repetive though.
}
if (teamnamesquestion == "yes" || teamnamesquestion == "Yes" || teamnamesquestion == "YES")
{
repeat = 0;
break;
}
system("pause");
system("cls");
return0;
}
this seams like repeat should break the while loop when set to two,
in fact it does not. weard?
could you guys please help me fiqure out the problem, thanks.