Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
illegal default
The keyword default
can appear only in a switch
statement.
The following sample 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;
}
}