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 C2362

initialization of 'identifier' is skipped by 'goto label'

When compiling with /Za, jumping to the label prevents the identifier from being initialized.

You cannot jump past a declaration with an initializer unless:

Example

void func()
{
   goto label1;
   int i = 1;         // error, initialization skipped  
   {     
      int j = 1;      // OK, this block is never entered
   }
label1:;
}