i have something like
while(playAgain==true)
{
cout<<\"new game\"<
Don't cook spaghetti and extract your loops into the function:
void foo(...) {
while (...) {
/* some code... */
while (...) {
if ( /* this loop should stop */ )
break;
if ( /* both loops should stop */ )
return;
}
/* more code... */
}
}
this decomposition will also yield cleaner code since instead of hundreds of lines of ugly procedural code, you will have neat functions at different levels of abstraction.