Quote:
>Okay i've got a nice little flashcard program that i wrote that will
>basically show a word for a set amount of time then clear the screen
>and let you type in the word and then it checks for spelling. THe
>only problem is that i use either delay, sleep, or my own
>function--pause--to set the amount of time that the word is shown,
>none of these willl actually also lock out the keyboard(i.e. the user
>can type in the word while it is still displayed). Can anyone tell me
>how to temporarily lock the keyboard or otherwise overcome this
>problem?
You'll may find it easier to flush any waiting input than to lockout
the keyboard. Just flush it between the time the word is cleared and the
user is prompted for input. This type of code would be rather compiler/
system specific (fflush(stdin) in NOT the solution!). So, you'll need to
check in a group that specializes in your os and/or compiler. The c.l.c
faq (Frequently Asked Question) list mentions a few functions tthat might
help with this on various systems. The faq list is available by anonymous
ftp from rtfm.mit.edu /pub/usenet/comp.lang.c.
--
John R Buchan -:|:- Looking for that elusive FAQ? ftp to: