Problem: The c++ applicaton has code for graceful shutdown. But whenever the user closes the DOS window, the application crashes. I have tried adding exception handling (set_terminate etc.) but with no success. The application is an exe file and prints output to the dos window.
Does anybody know how to catch the event when DOS window is closed (using 'X' window closing button or on CTRL-C) so that I can execute the shutdown code?
Does anybody know how to catch the event when DOS window is closed (using 'X' window closing button or on CTRL-C) so that I can execute the shutdown code?