Hello! here is what I wanna do:
I have a while() statement, and inside of it I have some instructions to repeat. My problem is that, I want somehow to stop that loop ONLY when I press a key... I it's kinda like getch() but getch() waits for a keypress.... Any help is appreciated
Thanx in advance.
I assume you have
getch() available. Not all compilers do, making any code using it non-portable. But if you do, look to see if the compiler has a function called
kbhit(). That's the function you're looking for.
Last edited by WaltP; Dec 2nd, 2006 at 2:01 am.
Reputation Points: 3275
Solved Threads: 890
Posting Sage
Online 7,717 posts
since May 2006