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
To do this quick hack, the most common two options are:
/* Windows only */
#include
system("pause");
and
/* Cross platform */
#include
printf("Press enter to continue...\n");
getchar();
I suggest the latter method, though the first method really triggers on "any" key while the bottom one only triggers on enter.