![]() |
| ||
| C++ for loops for the for loop for ( ; *source!='\0'; source++) what is the purpose of the semicolon in the for loop ? thank you! |
| ||
| Re: C++ for loops (1) The language specification requires them. (2) they separate initialization, condition, and increment statements. |
| ||
| Re: C++ for loops in a normal loop you would have for( i = 0; i < n; i++)but in your code the semicolon simply states that it doesnt matter what the first section( i = 0) is.[edit] What AD said. lol. |
| ||
| Re: C++ for loops thank you!! |
| ||
| Re: C++ for loops All of the sections are optional, so we sometimes end up with this: for(;;) |
| All times are GMT -4. The time now is 3:25 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC