Namespaces
Variants
Views
Actions

continue statement

From cppreference.com
< cpp‎ | language
Revision as of 13:41, 15 August 2011 by P12 (Talk | contribs)

Template:cpp/language/sidebar Causes the remaining portion of the nearest for, while or do-while loop body skipped.

Used when it is otherwise awkward to ignore the remaining portion of the loop using conditional statements.

Contents

Syntax

continue

Explanation

This statement works as a shortcut to the end of the nearest loop body.

In case of while or do-while loops, the next statement executed is the condition check (Template:sparam). In case of for loop, the next statements executed are the iteration expression and condition check (Template:sparam, Template:sparam). After that the loop continues as normal.

Keywords

continue

Example

Template:example cpp