Very Quick Newbie MSVC++ Question

Started by
4 comments, last by Radagar 21 years, 10 months ago
How do I tell an MSVC++ Console App to stop running? I''m currently using the abort() function, but that does an abnormal program termination. Is there another command that just tells the program it''s done running and closes? Thanks! ~~~~~~~~~~~ Chris Vogel ~~~~~~~~~~~
WyrmSlayer RPG - In Early Development
Advertisement
exit(0);

Might work, I can''t really remember right now, so please don''t flame me if im wrong


----------------------------
I HATE COLLISION DETECTION!!
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
Exit seemed to work. Thanks!

~~~~~~~~~~~
Chris Vogel
~~~~~~~~~~~
WyrmSlayer RPG - In Early Development
return?

kezz

-------------------------
My homepage
-------------------------0 A.D.
Using return(0); within main would obviously work, but I assumed he needs to be able to close the app from elsewhere

exit(0); will achieve the same as his abort() command but will be, er, cleaner...


----------------------------
I HATE COLLISION DETECTION!!
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
And if you want to delay it a bit before exiting(might be too fast), you can use _sleep(#ofsec).



Wachar''s Eternity <-<-<-<-<- Me own site!
Wachar's Eternity <-<-<-<-<- Me own site!

This topic is closed to new replies.

Advertisement