共用方式為


編譯器警告 (層級 4) C4061

列舉值 'identifier' (位於列舉 'enumeration' 的 switch 中) 沒有被 case 標籤明確處理

此列舉在 switch 陳述式中沒有關聯的處理常式。

此警告在預設情況下為關閉的。 如需詳細資訊,請參閱預設為關閉的編譯器警告

下列範例會產生 C4061:

// C4061.cpp
// compile with: /W4
#pragma warning(default : 4061)

enum E { a, b, c };
void func ( E e )
{
   switch(e)
   {
      case a:
      case b:
      default:
         break;
   }   // C4061 c' not handled
}

int main()
{
}