Mail Archives: djgpp/2001/08/21/18:09:39
Here's a code snippet, taken from Ivor Horton's Beginning C++. It involves
BREAKing a loop, after a certain number of invalid values are input.
After i have compiled, when i try to run the program, i get a message saying
BREAK is off and then it goes back to the DOS prompt. Whats the problem??
other code
//make sure table size is within limits
if(table >= table_min && table <= table_max)
break; //exit the input loop
else if(count < input_tries)
cout << "Invalid input - Try again.";
else
{
cout << "Invalid table size entered - for the third time."
<< "\nSorry, only three tries - program terminated."
<< endl;
exit(1);
}
other code
------------------------------------------------------------
Get your FREE web-based e-mail and newsgroup access at:
http://MailAndNews.com
Create a new mailbox, or access your existing IMAP4 or
POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------
- Raw text -