Where it should exit nice and easy just as if the program reaches the end of main. What it does though instead, is the window will stay open, not respond, then after about a minute will close. Any solutions?
Exit will normally call the destructors for any globals that were created (in reverse order). Make sure the destructors for your globals are bulletproof.
Helios, I use visual studio's debugging tool. I use the debugger and breakpoints, etc and it executes the exit(0) and then just stays there. Assumingly to call the destructors as Abstract mentioned. I presume you mean a third party debugger...? If so, have any suggestions?
After you call exit() and the program hangs... go in VS and press the "Break All" button (it looks like a Pause button). The debugger will snap on the line of code the program is currently executing (which, if you're in some kind of deadlock... will be in the deadlock).