break vs continue
-
Hi, Any one can explain the difference between break and continue? Regard Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
-
Hi, Any one can explain the difference between break and continue? Regard Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
NicholasCougar wrote: Any one can explain the difference between break and continue? break gets out of the loop immediately. continue will break out of the current iteration. Nish
The posting stats are now in PDF:- http://www.busterboy.org/codeproject/ Feel free to make your comments. Updated - May 04th, Saturday
-
NicholasCougar wrote: Any one can explain the difference between break and continue? break gets out of the loop immediately. continue will break out of the current iteration. Nish
The posting stats are now in PDF:- http://www.busterboy.org/codeproject/ Feel free to make your comments. Updated - May 04th, Saturday
Hi, the difference between loop and iteration? Regard Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
-
Hi, the difference between loop and iteration? Regard Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
A loop is the whole thing, an iteration is once through the loop. for (int i = 0; i < 10; ++i) { if ( 5 ==i) continue; cout << i; } will print 012346789. for (int i = 0; i < 10; ++i) { if ( 5 ==i) break; cout << i; } will print 01234. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002