With a loop using kbhit() and getch(). Look up the documentation for these 2 functions.
Also I should mention that there is a curses library for Windows called pdcurses, so if you ever might want...
Type: Posts; User: NeonBlack
With a loop using kbhit() and getch(). Look up the documentation for these 2 functions.
Also I should mention that there is a curses library for Windows called pdcurses, so if you ever might want...
There is no portable way to do this, so it depends which OS you want to run it on. The easiest ways to do it on Windows and Linux are probably conio.h and curses, respectively.