I want to be able to do something along the lines of Press any key to exit at program completion, but have no been able to figure out how to.
When I run
It's an old question but thought I'd add a technique I use when testing programs on a Windows box.
Compile program into an exe. And then create a batch script to "wrap" the program along the lines of:
@echo off
foo.exe
pause
exit
which will execute your program as it should be, without any dirty hacks, while allowing you to pause the window and see the output.