I could be wrong, but I think do-while and while were part of the original C language, and basically C++ just inherited them.
do-while
while
I never use any of these
Who cares
I could be wrong, but I think do-while and while were part of the original C language, and basically C++ just inherited them.
I'm with some of the other guys.
Each is useful in different contexts. If you don't need to go into the loop at least once, why bother.
DS
Because sometimes you only want to go into the loop if a certain condition is true; thus, with a while loop, you can cut out an extra if statement which might make your code uglier.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
The poll is now closed.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]