I phrased it slightly wrong. Case may not define a scope, but a switch sure does. This does not work exactly because switch defines a scope...
int foo = 1;switch(foo){case 1:{ int bar = 5; break;}}cout << bar << endl;
This gives you this error:
test.cpp(17) : error C2065: ''bar'' : undeclared identifier
Tell me that is not a defined scope.
God was my co-pilot but we crashed in the mountains and I had to eat him...
Landsknecht
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.