Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/language/break"

From cppreference.com
< cpp‎ | language
(Created page with "{{title|break statement}} {{cpp/language/sidebar}} Causes the enclosing {{rlp|for}}, {{rlp|while}} or {{rlp|do|do-while}} loop or {{rlp|switch | switch statement} to terminate. ...")
 
m (1 revision: import content)

Revision as of 14:47, 6 June 2011

Template:cpp/language/sidebar Causes the enclosing for, while or do-while loop or {{rlp|switch | switch statement} to terminate.

Used when it is otherwise awkward to terminate the loop using the condition expression and conditional statements.

Contents

Syntax

break

Explanation

After this statement the control is transferred to the statement following the enclosing loop.

Keywords

break

Example

Template:example cpp