The key points to remember about switch statements in C++ are:
- When a
casestatement matches and executes, it will exit the currentswitchblock unless afallthroughis used. - You can use
fallthroughto continue executing the nextcasestatement. - The
switchstatement can have an initialization statement, which is separated by a semicolon from the conditional expression.
