简单问题:switch case语句问题
CString Sign="";
switch(Sign)
{
case 'S23':
break;
default:
break;
}
报错:
error C2450: switch expression of type 'class CString' is illegal
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
switch语句的表达式不能是CString 类,那这种的怎么解决?我这个sign有很多情况,是2或者3个字符的字符串, 有100多种可能情况。谢谢各位大虾了!