oops...I hit enter too soon. I tried typing in a letter for the menu and it kept repeating its self over and over lol.
oops...I hit enter too soon. I tried typing in a letter for the menu and it kept repeating its self over and over lol.
Code:default: { cout<<"Error, bad input, quitting"; return 0; } //Question, why do you have a two space indent, then change to a 4 space indent?
yes, if the user is susposed to enter an int but enters a char or some value that can't be interpretted as an int, then the program is likely to enter an endless loop. To figure out how to handle that problem you need to use data validation techniques. It's not hard, but it's not as easy as you might think either. There are a number of ways to do it. Starting with a search of the board is a good place to start. Then determine which technique you wish to use. Give it a try. Come back when you get stuck.