Originally Posted by
citizen
I think this is just a misunderstanding of Windows' behavior when it comes to the console. If you manually close the console while it is running an executable, then in order to do what you expect the console has to quit everything it's doing in a hurry. Often this gets interpreted as an error with the console because that's pretty much all Windows knows about the actual executable you tried to run, and it doesn't really know what else to do about the exit status that was returned from *your* C++ program.