The command-line program always closes the window after it is completed. I know that you can use cin.get(); to wait for user input. Is there a way that the user could press any key (instead of typing something, and then press enter) to close the program? I do not want to use system("PAUSE") as it is Windows dependent and slow.
I want him to pause so that the user can see that he has completed successfully and other details. It will probably not be launched from an already open command prompt, and the executable will be double clicked to run.
source share