Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 7th, 2004, 6:06 AM   #1
Ade
Hobbyist Programmer
 
Ade's Avatar
 
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0 Ade is an unknown quantity at this point
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
__________________
Don't wound what you can't kill
Ade is offline   Reply With Quote
Old Dec 8th, 2004, 5:01 AM   #2
Ade
Hobbyist Programmer
 
Ade's Avatar
 
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0 Ade is an unknown quantity at this point
Can this even be done? I think the cin statement will halt the program indefinately no matter what I do, am I right?
__________________
Don't wound what you can't kill
Ade is offline   Reply With Quote
Old Dec 8th, 2004, 12:38 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I believe you're correct - if you want to stop after 5 seconds, look into making your own function using kbhit() (I think).
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:27 AM.

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