(without having to press enter afterwords)
Also, the headers i included are required, i believe, for it to work. Of course, all other headers are still need too, like #include <iostream>.
- Code: Select all
#include <conio.h>
#include <stdio.h>
void wait ()
{
cout << "\nPress any key to continue\n";
while(!kbhit()) ; //means while no buttons are pressed
return;
}
So add this function in anywhere, then when ever you want, just call
wait ();
then it will temporarily pause until a button is pressed. Hope this helped someone.

