Share via


Labeled Statements

To transfer program control directly to a given statement, the statement must be labeled. See Using Labels with the goto Statement and Using Labels in the case Statement.

Remarks

There are three types of labeled statements. All use a colon to separate some type of label from the statement. The case and default labels are specific to case (or switch) statements:

identifier : statement 
case constant-expression : statement 
default : statement

See Also

Reference

Overview of C++ Statements

The switch Statement

The switch Statement