continue statement

   
continue statement Reiterates a loop statement

  statement  := continue ; 

The continue statement iterates a loop statement without executing the rest of the loop body. Control passes directly to the loop condition in a do or while loop or to the iterate expression in a for loop. You cannot use continue outside of a loop statement.

Example

 while (getline(cin, line)) {   if (line.empty(  ))  continue  ;   parse(line);   do_more_stuff(  ); }; 

See Also

break , do , for , statement , while , Chapter 4

   


C++ in a Nutshell
C++ in a Nutshell
ISBN: 059600298X
EAN: 2147483647
Year: 2005
Pages: 270
Authors: Ray Lischner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net