Compiling the following code and got the error of type illegal.
type illegal
int main() { // Compilation error - switch expression of type illegal sw
You can't use string in switch case.Only int & char are allowed. Instead you can try enum for representing the string and use it in the switch case block like
enum MyString(raj,taj,aaj);
Use it int the swich case statement.