Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. break vs continue

break vs continue

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studioquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NicholasCougar
    wrote on last edited by
    #1

    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.

    N 1 Reply Last reply
    0
    • N NicholasCougar

      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.

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      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

      N 1 Reply Last reply
      0
      • N Nish Nishant

        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

        N Offline
        N Offline
        NicholasCougar
        wrote on last edited by
        #3

        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.

        C 1 Reply Last reply
        0
        • N NicholasCougar

          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.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups