A while loop. this is a good example of what that loop is good for. Prompt for input; receive input; while input is invalid { display error; accept new input; } . . . continue processing; Hope this pseudo code helps. Dale leavens.----- Original Message ----- From: "Jes" <theeternalkid@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx> Sent: Tuesday, July 20, 2010 6:36 AM Subject: Implimenting prompts in program for reinput from user?Say I want a user to enter a number from 1 to 3, but they enter something else, like 4, or the letter v, or whatever. How would I tell the program to display an error message to the user using cout, then return them to the initial prompt?
Thanks. Jes __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________View the list's information and change your settings at //www.freelists.org/list/programmingblind