| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
visual studio2003, press any key to continue and poof-
Hi, I am taking a class in c++ entry univ level. I am not asking for my assignments done. I have done them , all 18 of them. The final, which was a beast consisted of overloaded functions and calculating either the area or volume of 5 geometric shapes. I have it working==almost. The problem is and I am not sure what to do, is that the compiler puts the message in "press any key to continue" and when you press any key, its exits the program. What I need is something to the effect "to calculate another press y, to exit press n. I know how to do the default if there are any other keys hit, just not sure how to make it go back to the top to redo. Thanks
|
|
#2
|
|||
|
|||
|
Hey mtss....
If you simply want to redo, lock all the code between WHILE () statement and that should take care of it. Example: Code:
key = <get the keythat was pressed>....
WHILE (key != <exit key>)
{
/*--the aplication code!!--*/
}
I really don't know if that's what you're asking. But, what the hell!! Good Luck Anibal. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > visual studio2003, press any key to continue and poof- |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|