Mail Archives: djgpp/1999/10/05/06:39:53
On Mon, 4 Oct 1999, Roland Moritz wrote:
> And now my question is, how do I empty the keyboard buffer everytime the
> loop is through, since I don't want, for example, that if a message is shown
> for 5 Seconds, and the player pushes some keys, that they will be used as
> keyboard input the next time the loop is running through, since there are
> still keys in the buffer...I've tried it with something simple like
>
> while (kbhit()
> c = getch();
>
> But it does'nt work...
The above *is* the way to empty the keyboard. If it doesn't work for
you, please post the shortest test program that can be compiled and
that demonstrates how does it fail. Please also tell how do you run
the test program and what do you expect to happen if it did work.
- Raw text -