Team LiB   Previous Section   Next Section
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

    Team LiB   Previous Section   Next Section