So I have developed a C++ console application in Visual Studio to keep log of attendance with a credit card reader, then spit out a .csv file. However, as the program is right now, the user has to manually type "exit" for the program to close successfully and generate the .csv.
I know that non-tech people wouldn't realize this and could just hit the X button and lose their data. Is there any way to catch the signal and allow the program to do its cleanup work and close?
The program is already Windows-only so that is not an issue.