共用方式為


編譯器警告 (層級 1) C4144

'expression' : 關係運算式作為 switch 表達式

指定的關係表達式是當做 switch 語句的控件表達式使用。 相關聯的案例語句將會提供布爾值。 下列範例會產生 C4144:

// C4144.cpp
// compile with: /W1
int main()
{
   int i = 0;
   switch(!i) {   // C4144, remove the ! to resolve
      case 1:
         break;
      default:
         break;
   }
}