Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Timed Input Ii (http://www.programmingforums.org/showthread.php?t=1453)

Ade Dec 7th, 2004 7:06 AM

Hi guys, I know there is a thread already about this topic but I have a different question:

I know it's possible to time how long it's taken for somone to input something (see thread names Timed Input) but I'm wondering if it's possible to give someone a set ammount of time to input something? Say five seconds, then after the five seconds the program continues rather than staying at the cin line.

I'm nopt even sure if this is possible? I have tried researching on the net and in college books but neither have given me even the smaller idea of how I may go about this?

Any help, even a pointer (no pun intended) would be great :)


Cheers Ade

Ade Dec 8th, 2004 6:01 AM

Can this even be done? I think the cin statement will halt the program indefinately no matter what I do, am I right?

Ooble Dec 8th, 2004 1:38 PM

I believe you're correct - if you want to stop after 5 seconds, look into making your own function using kbhit() (I think).


All times are GMT -5. The time now is 3:21 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC