Search:
Forum
General C++ Programming
while(true)
while(true)
Aug 14, 2010 at 3:47pm UTC
UmlautBanana
(3)
What does that do? I know what the while loop is; you put the condition in parentheses and it loops until the condition is false, but that's just the problem here: until what is false? Someone please explain this to me.
Aug 14, 2010 at 3:55pm UTC
Disch
(13742)
true is never false, so the loop never exits. It's an infinite loop.
The only way to get out of it is with
break
,
throw
,
goto
, or
return
.
Last edited on
Aug 14, 2010 at 3:55pm UTC
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs