Re: Help with a do loop
You never actually gave a condition for the loop to keep running. It would go just before the final right brace in your code. The condition looks liek
while(condition);
basically the do loop will continue running while that condition evaluates to true, and the condition is checked after every execution of the loop. This means the loop will run at least 1 time.
development hint: This is not a prolem in the code, but you may want to remove the if statement for option 3 and make that your while condition. This would make the program continue execution past the menu loop if option 3 was selected. Since there is, currently, nothing beyond the do while loop except the end of the main function, that should, in effect, quit your game.
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector