BlackGame Problem!

if(bet >= 1)
{
cout << "Let's Play!" << endl;
do{

cout << "Hit[" << hit << "]" << "Stand[" << stand << "]" << endl;
cout << "Cards: " << results++ << endl;
cin >> enter;

if(enter == 1)
{
continue;
cout << "Hit[" << hit << "]" << "Stand[" << stand << "]" << endl;
cout << "Cards: " << results++ << endl;
cin >> enter;

}
else if(enter == 2)
{
break;
cout << "Game Over!" << endl;
}

}while(enter != 1 );
}
else
{
cout << "Guess you don't want to play." << endl;
}



system("PAUSE");



It won't loop the do-loop and I don't know why. can someone help me.. NOTE: This is just the do loop itself because the program has alot of lines D:
Well, if you enter 1, then the continue causes the rest of the do block to be skipped. Since the condition enter!=1 is false (enter is 1, after all), the loop won't be continued.
If you enter 2, the loop is broken by the break statement (Game Over will never be printed because of that, by the way).
thanks for explaining it, the error makes sense now. I fixed it ^^

Thanks Athar :d
Topic archived. No new replies allowed.