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
Depending on your need and platform, you may use getch() (or _getch()), or ultimately getchar().
The problem with getchar() is that it requires the user to press "enter".
The advantage with getchar() is that it is standard and cross-platform.
getch() get all the other property : it just needs a key to be pressed, no display, no "enter" needed. But it's non standard, so support varies depending on platform.
Alternatively, for windows only, there is also :
system("pause");