I'm making a game with C++, the trouble is i can't reset the _kbhit to null, any help will be appreciated
With C++ how do i set "_kbhit()" to null after it has detected a key.?
call getch() to read the character. You can ignore the value if you don't need it. If there is more than one character in the queue, then kbhit() will return true until the queue is empty.
Reply:after each successful detection of a key flush keyboard buffer
with this statements:
while(_kbhit()) getch();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment