+ 2

How to make an loop infinite in cpp ?

5th Jan 2018, 2:09 AM
Bharath Kalyan K B
Bharath Kalyan K B - avatar
4 Answers
+ 7
Make a while loop with a condition, that's always true. Like while( true ). :)
5th Jan 2018, 2:14 AM
Tob
Tob - avatar
+ 4
for( ; ; ){ your logic }
5th Jan 2018, 10:56 AM
Bhavin Kundaliya
Bhavin Kundaliya - avatar
0
while(1) { cout<< ("infinity loop"); }
5th Jan 2018, 7:23 AM
‎ ‏‏‎Anonymous Guy
0
while (true) { //code }
5th Jan 2018, 9:00 PM
Jacob Pembleton
Jacob Pembleton - avatar