break statement
From cppreference.com
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.