Archived

This topic is now archived and is closed to further replies.

Strange for-loop

This topic is 5334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I noticed this code while making BB collision detection (Bounding box) collision detection. directly from 3DDisplayObject.cpp from (SDK root)\samples\c++\demos\donuts4\
for(;;)

as far as i have been able to decipher it is it like this
for(/*nothing*/ ; /*nothing*/ ; /*nothing*/ )

Does this mean it is a infinty loop? and why don''t we use it while or do for that?

Share on other sites
the for(; loop is also equivalent to this: while(1)

its a never ending loop!! YAAAY!

as far as why to use it instead of a while, I do not know. But its equally as fun!

..except when u get stuck in one

~Guyaton

Share on other sites
quote:
Original post by guyaton
as far as why to use it instead of a while, I do not know. But its equally as fun!
..except when u get stuck in one
~Guyaton

Thanks Guyaton, what a quick replay (less than a minute ).
And who wouldn''t hate doing the same thing over and over again.

but thanks anyway

Share on other sites

Wow! I''m good! No wait, I''m better than good! I''m Perfect...
Nah, just good! Otherwise I wouldn''t have to improve
-- Wouter Lindenhof --

1. 1
Rutin
39
2. 2
3. 3
4. 4
5. 5

• 12
• 17
• 12
• 14
• 9
• Forum Statistics

• Total Topics
633357
• Total Posts
3011505
• Who's Online (See full list)

There are no registered users currently online

×