I wrote a pause function:
void Pause(void)
{
printf("Paused...\n\n");
fgetc(stdin);
}
It generally works fine (hit enter to continue). But one program doesn't seem to want to stop at all...
if(P == 0)
{
cout << "P=0!" << endl;
//just as another attempt to stop it , should stop here and ask for input
int a;
cin >> a;
//should stop here for input as well
Pause();
}
The output is this (and I never hit any keys):
0
P=0!
Paused...
0
P=0!
Paused...
0
P=0!
Paused...
Any idea why this wouldn't be stopping??
Thanks,
Dave