What does it do? Is it an infinite loop or something?Code:for ( ; ; )
{
//code here
}
Printable View
What does it do? Is it an infinite loop or something?Code:for ( ; ; )
{
//code here
}
Yes. It keeps going until you use break; :)
It is however, more proper to use a While loop for that purpose.
Not so sure, I think you can use both, since I've seen lots of usages of bothandCode:while(1) { }
Code:for(;;) { }
i'd use for(;;){} , looks better ;) i guess it's a qwestion of taste, anything for can do, can be done with while and vice versa
Notice the smilies that come up when you type for(;;)
yeah ;) i didn't bother turn off the smilies or put in a space, it looks funny :p