Hey,
how do you exit a game properly with all the destructors being called?
Yagani
Exit Game
Re: Exit Game
If I'm not mistaken destructors are called automatically when the class gets erased, eg. the program shuts down.
You can shut down a program by calling "exit ( 0 );". I read about the exit function, since I used exit(1) usually, that exit(0) and (1) are basically the same, but if you use error handling it is wise to use exit(0) when the shut down is intentional and exit(1) when you shut it down because of an error.
You can shut down a program by calling "exit ( 0 );". I read about the exit function, since I used exit(1) usually, that exit(0) and (1) are basically the same, but if you use error handling it is wise to use exit(0) when the shut down is intentional and exit(1) when you shut it down because of an error.
ʕ •ᴥ•ʔ
Re: Exit Game
IMO, for GUI based windows apps it is better to use PostQuitMessage
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
Re: Exit Game
Neither of Lux's options worked for me while LuisR14's option did work, thx guys.
Yagani
Yagani