Compiling the following code and got the error of type illegal.
type illegal
int main() { // Compilation error - switch expression of type illegal sw
I think the reason is that in C strings are not primitive types, as tomjen said, think in a string as a char array, so you can not do things like:
switch (char[]) { // ... switch (int[]) { // ...