fflush() didn't work. I changed the program by adding a second getchar() -
...
char x;
...
x = getchar();
getchar();
...
The second getchar() seems to "absorb" the '\n' from pressing the ENTER key. Program works fine now.
Thanks for your help anyway
Alan
|