4 ms·
"case" variable scope
by jjgreen 3y ago
"case" variable scope
- mytailorisrich 3y agocase x: { int local_var; } break;
- AnimalMuppet 3y agoThat might have issues with fallthrough. case 'a': int x = 7; // no break; case 'b': // Did we get here through 'b', or through 'a'? // Is x in scope, or not? Is it initialized, or not?