![]() |
|
#1
|
|||
|
|||
Exiting an infinite loop.below you see a simple infinite loop.
I want to run the code inside the loop n seconds and after n seconds I will hit ctrl-z so that the loop terminates. I dont want to type any other character to run the loop. It will loop infinite times until I enter ctrl-z CPP / C++ / C Code:
|
|||
|
#2
|
|||
|
|||
Re: please help me exiting an infinite loop...It depends on which system you are using. In Windows, they have something called called kbhit which will tell you when you hit a character. Unix is a bit more difficult. You may have to play with some ioctl things.
|
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| infinite loop!!! | cool | C Programming Language | 2 | 13-Aug-2007 15:59 |
| breaking an infinite loop through stdin | pisuke | C Programming Language | 9 | 03-Jul-2007 21:19 |
| Text-Based Roulette Game | mfm1983 | C++ Forum | 5 | 29-Nov-2006 13:20 |
| C++ Aparently on infinite loop, but where? | Link | C++ Forum | 7 | 08-Sep-2006 09:40 |
| Array 1 dimensional help please asap | lion123 | C Programming Language | 10 | 18-Feb-2005 22:53 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The