Ok.. here is a very stupid idea..
Multithread, one thread that is suspendd for the main menue. One for input and one for checking for '-1'. If the third thread finds '-1' make it suspend the input and checking (itself) threads and activate the main meue thread. Although I am sure that a more elegant and easier solution is out there somewhere...
Instead of exit you can use abort().. for breaks use catch(?). And for goto use switch(?) although that would be hard.... I don't see how you need those though...
Ilya
Home work agian.
I'm required to write a sales analysis program.
One of the function dose enter a new salesperson, it will prompt for personal detail. but if user keys in -1 at any point, it will cancel process and return to main menu options.
BUT according the programming standards of this, " GOTO statement, BREAK keyword and EXIT function are NOT allowed in any program. In C++ the use of Return to jump out of a function premeaturely is not Structured and therefore not allowed".
What can I do ?Thanks!!