473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

great problem

hellow all can any one tell me that how a program in c/c++ can be used to wait for the user to input the value and if the user didnt input it within 30 second then the program should run next line skipping that line
Apr 14 '07 #1
1 1066
JosAH
11,448 Expert 8TB
hellow all can any one tell me that how a program in c/c++ can be used to wait for the user to input the value and if the user didnt input it within 30 second then the program should run next line skipping that line
I'd create a second thread that sleeps for 30 seconds and kills the first thread
afterwards if some boolean hasn't been set (the boolean indicates that the
user had typed 'enter'). If thread killing is not permitted just leave the first thread
and indicate that it has become obsolete.

kind regards,

Jos
Apr 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: John Wellesz | last post by:
Hello, It would be great if there was an option to tell PHP to let the user manage all the HTTP headers instead of sending what it thinks is good for the programmer... For example when you...
2
by: David | last post by:
On every web browser except Safari, this website works great. (Well, by "every" I mean Mozilla, Netscape, and Internet Explorer, for Mac and Windows). The site is: http://www.ruleofthirds.com ...
354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
0
by: cow3 | last post by:
I have been guided to this great tool for performance analysis (many thanks to January): ...
1
by: Agnes | last post by:
my datagrid, e.g store (1)Prodcut id (2) product name (3)unitprice) I found a great problem under the following case:- row(1) User keyin the data, Press Save, i can save the content. I design...
0
by: Billie Boy | last post by:
Hi to all. I’m new here and am coming to you from Melbourne Australia. So a big HELLO 2 ALL. Thanx for having me here. TOP forum you guy's have here! Can anyone answer my problem? Please. ...
9
by: james.calhoun | last post by:
OK... i think this is an easy question. I Have a number of Divs, and when you rollover the divs their border color changes. When You click on a div, I want the rollover state to stick. I...
1
by: flit | last post by:
Hi all, I had one problem with csv files. And I put the message on 2 microsoft board and in this group. Results: No response from microsoft, and always 3 responses for posts on this lists....
32
by: Tom Cole | last post by:
I bet 50% of the posts I've read lately have had at least one bad thing to say about every website or book dedicated to javascript. There are clearly a few posters (you know who you are) who...
42
by: gt8887b | last post by:
Hello! In his recent newsletter embedded expert Jack Ganssle says that programming students, as well as professional developers should readh "great code" (hight quality/well-crafted code that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.