 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mike Wahler Guest
|
Posted: Tue Jul 29, 2003 12:55 am Post subject: Re: [C++] Timer WHILE waiting for input |
|
|
Poof <seiromem (AT) hotmail (DOT) com> wrote
| Quote: | Lets say we're doing a maths quiz program, and each question will be
skipped
if the timer expires without any input.
|
ISO standard C++ (the topic here) does not support
nonblocking input. You'll need a platform-specific
solution.
| Quote: |
Surfing through the net I see a way to do it with kbhit(),
|
This shows why it's not a good idea to depend upon "C++
information" you might find on the web. The large majority
of it is simply wrong. There is no such function 'kbhit()'
in standard C++. Some PC-based compilers do provide such
a function, but each implementation will work in its own
way, and in a platform-specific manner.
| Quote: | but it limits the
input to just one character, is there anyway to do more complex inputs?
|
There is no way to do nonblocking input in standard C++.
Try a newsgroup about your platform and/or implementation.
-Mike
|
|
| Back to top |
|
 |
Poof Guest
|
Posted: Wed Jul 30, 2003 1:35 pm Post subject: [C++] Timer WHILE waiting for input |
|
|
Lets say we're doing a maths quiz program, and each question will be skipped
if the timer expires without any input.
Surfing through the net I see a way to do it with kbhit(), but it limits the
input to just one character, is there anyway to do more complex inputs?
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|