what is wrong with this code:
actually i wanted it to be wait until user press any key before return anything.
but it seems that it didn't stop after printf() is output for user to press any key, and it just return.
how it happens?
i want it to stop and wait for user to press any key, then return.
I have to write it in C language(no C++).
please help
Code:
char Invalid() { char ignore[1]; printf("\t\tInvalid choice! Please press any key to try again.\n"); gets(ignore); return atoi(ignore); }
but it seems that it didn't stop after printf() is output for user to press any key, and it just return.
how it happens?
i want it to stop and wait for user to press any key, then return.
I have to write it in C language(no C++).
please help
Comment