You need a compiler specific function, like maybe kbhit() which will test for input without pausing your program. Search and ye shall find...