NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2046

illegal case

The keyword case can appear only in a switch statement. The following sample generates C2046:

void main() {
   int i = 0;

   case 0:      // C2046, delete case to resolve error

   switch(i) {
      case 0:   // ok
      break;

      case 1:    // ok
      break;

      default:   // ok
      break;
   }
}