Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

Compiler Warning (level 3) C4060

Error Message

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

The following sample generates C4060:

// C4060.cpp
// compile with: /W3
int main()
{
   int i = 0;
   switch( i );   // C4060
   // correct syntax for switch block
   switch( i )
   {
      case '0':
         i++;
      default:
         i = 9;
   }
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.