Compiler Error C2047 (original) (raw)
illegal default
Remarks
The keyword default can appear only in a switch statement.
Example
The following example generates C2047:
// C2047.cpp
int main() {
int i = 0;
default: // C2047
switch(i) {
case 0:
break;
}
}
Possible resolution:
// C2047b.cpp
int main() {
int i = 0;
switch(i) {
case 0:
break;
default:
break;
}
}