I\'ve always wondered this - why can\'t you declare variables after a case label in a switch statement? In C++ you can declare variables pretty much anywhere (and declaring
New variables can be decalared only at block scope. You need to write something like this:
case VAL: // This will work { int newVal = 42; } break;
Of course, newVal only has scope within the braces...
Cheers, Ralph