a method use while() difficult to understand

hi ! my friend .
one beautiful day , i was met a part of code that i cant understand
that is :
# include<....> // pre-precess
.....
void main ()
{
....
... // code putting here.. and
while(true); // why is not after/before truct while have not code block ?
}
thank very much !!!
You forgot some part of the code. http://www.cplusplus.com/doc/tutorial/control/ Take a look at do ... while
also dont use void main
indentation may help
1
2
while(true)
   ;
there you've got an infinite loop that basically does nothing, just melt your processor.
perhaps an awful hack to "keep the console open long enough to see the output"
hiihih thank you very much!!! i love all
Topic archived. No new replies allowed.