![]() |
|
#1
|
|||
|
|||
For loop expression questionI ran across this expression in my textbook and I can't seem to find the answer in it.
In the expression: for ( ;; ) { //some iostream statements here } What does ;; represent in the For loop? Thanks, MB |
|||
|
#2
|
|||
|
|||
Re: For loop expression questionBasically, a for() loop has 3 sections in the parenthesis, each separated by a semicolon.
for( Do Once at the beginning of the loop ; Continue looping if this is true or blank ; Do once at the end of each iteration ) You can leave any of the sections out so for( ;; ) is simply a loop that goes on forever. If you want to exit this kind of loop, use the statement break; from within the loop. |
|
#3
|
|||
|
|||
Re: For loop expression questionThank you very much.
|
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Please, This is Difficult question try for me! | bcompt143 | C++ Forum | 4 | 24-Aug-2008 10:14 |
| Question on how to apply do while loop | fishguts | Java Forum | 1 | 04-Oct-2007 12:21 |
| Question about locking surfaces to directly access pixels, SDL. | george89 | C++ Forum | 0 | 18-Jun-2006 22:16 |
| Can enum have same name as class? | crystalattice | C++ Forum | 3 | 08-Dec-2004 17:43 |
| question of practice | magiccreative | C++ Forum | 1 | 06-Feb-2004 08:17 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The