c++ switch jump to case label code example
Example 1: jump to case label c++
put everything in the case x: under {} brackets
metti tutto quello nel case x: sotto le parentesi {}
Example 2: cannot jump from switch statement to this case label c++
switch(foo) {
case 1:
int i = 42; // i exists all the way to the end of the switch
dostuff(i);
break;
case 2:
dostuff(i*2); // i is *also* in scope here, but is not initialized!
}