This documentation is archived and is not being maintained.

Compiler Warning (level 3) C4065

Error Message

switch statement contains 'default' but no 'case' labels

The switch statement specifies a default case only. This is equivalent to a sequence of statements.

Example

// C4065.cpp
// compile with: /W3
void func(int i)
{
   switch(i)
   {
      default:
         i++;
   }   // C4065
}

int main()
{
}
Show: