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.
C2466
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2466
 
     cannot allocate an array of constant size 0
 
     An array of constant size 0 was allocated or declared.
 
     The constant expression used to allocate or declare an array must
     be an integral type greater than zero.
 
     An array declaration with a zero subscript is legal only for
     a class, structure, or union member, and when the Microsoft
     extensions (/Ze) are enabled.
 
     The following examples cause this error:
 
          int *p = new X[0];        // error
          C *aC = new [int_var] C;  // error
          int[0]                    // error
                                    -♦-