c++ using break in switch statement code example
Example 1: switch c++
switch(expression) {
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}
Example 2: c++ awitch statements
var = 1
switch (var):
case 1:
break; // Code that is executed if var is 1
case 2:
break; // Code that is executed if var is 2
default:
break; // Code that is executed if no cases match