如何使用switch语句的QString?编译器给出了以下错误: switch expression of type 'QString' is illegal 代码如下: bool isStopWord( QString word )boolflag = false ;
{ flag = true ;case "at" :
flag = true
使用switch语句的最佳做法是使用if30个unsigned枚举的语句,其中约10个具有预期的操作(目前是相同的操作)。性能和空间需要考虑,但并不重要。switch 声明: // numError is an error enumeration type, with 0 being the non-error case{