Quote:
|
Originally Posted by jim mcnamara
Although fgetc() seems like a choice....
|
Not unless you specifically set stdin to unbuffered...
How about
:
Code:
void pause()
{
system("read -n 1 -p \"Press Any Key To Continue\" < /dev/tty");
printf("\b \n");
fflush(stdout);
}
Granted, launching a whole new process isn't the most efficient way to do this, but you never cared about that before, so if you're looking for a quick and simple solution this will work. It will wait for one and only one keyboard hit, unlike jim's similar solution, which waits for the enter key.