windows - Console pause in C++? - Stack Overflow
#include // ... getchar(); The function waits for a single keypress and returns its (integer) value. For example, I have a function that does the same as System("pause"), but without requiring that "pause.exe" (which is a potential security whole, btw): ...