A
aaron80v
Hi,
A simple question: In ANSI-C, how to specify a string as the expression
for switch statement.
eg
switch (mystr) {
case "ABC" : bleh...
break;
case "DEF" : bleh
break'
default: bleh;
break;
}
AFAIK, the expression must produce an integer value. In the case of a
string, what is the work-around?
Aaron
A simple question: In ANSI-C, how to specify a string as the expression
for switch statement.
eg
switch (mystr) {
case "ABC" : bleh...
break;
case "DEF" : bleh
break'
default: bleh;
break;
}
AFAIK, the expression must produce an integer value. In the case of a
string, what is the work-around?
Aaron