C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
C2362
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2362
 
     initialization of 'identifier' is skipped by 'goto label'
 
     A jump to the specified label prevented the specified identifier
     from being initialized.
 
     It is illegal to jump past a declaration with an initializer
     unless:
 
        ■ The declaration is enclosed in a block that is not entered.
 
        ■ The jump is from a point where the variable has already
          been initialized.
 
     The following is an example of this error:
 
          void func()
          {
             goto label1;
                int i = 1;        // error, initialization skipped
                {
                   int j = 1;     // OK, this block is never entered
                }
             label1:;
          }
                                    -♦-