C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[C++] Timer WHILE waiting for input

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Mike Wahler
Guest





PostPosted: Tue Jul 29, 2003 12:55 am    Post subject: Re: [C++] Timer WHILE waiting for input Reply with quote




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





PostPosted: Wed Jul 30, 2003 1:35 pm    Post subject: [C++] Timer WHILE waiting for input Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.