Included in the
conio.h library for
C/
C++.
Prototype:
int _ungetch(int c);
Description:
The _ungetch() function puts the character c back into the keyboard buffer, so that c will be the next character read by _getch() or _getche(). You can call _ungetch() only once before the next read.
Returns:
If the function successfully places the character back onto the buffer, c is returned. If it fails for whatever reason, EOF is returned.