flush input buffer?
baseball.mjp at gmail.com
Sat Oct 18 08:41:05 PDT 2008
Okay, so I'm sure if flushing the input buffer is what I want, or if that even makes sense, so I'll say what I'm trying to do first to see if that's what I want.
So, I made this program where you specify the number of digits in a number you want to remember. Then, it ask you how many questions.
Anyways, a number will show up. Then, you have 4 seconds to remember. Then, 30 lines are skipped as my "clearing of the screen". Sleep another second.
You are then asked to type in the number you saw.
The problem I have is that the user can just type in the number while they see it, and what the typed will show up when the prompt comes up.
What I want to do is "flush the input buffer" just before I request for input so the user can no longer type in the number while they see it.
More information about the Digitalmars-d-learn