I recommend reading here . I think,
getchar()
may be what you need.
EDIT: Actually possible
#include <conio.h> _getch()
will work better for you, since it does not require a line break character (enter the button that will be pressed). For windows, refer to this and for unix systems, this seems to be included in the curses library .
Hope this helps!
source share