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.
C2073
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2073
 
     'identifier' : partially initialized array requires a default
     constructor
 
     An array of user-defined types or an array of consts was specified
     with too few initializers.
 
     If an explicit initializer (and its corresponding constructor) is
     not specified for a member of an array, then a default
     constructor must be supplied.
 
     The following is an example of this error:
 
          class A
          {
          public:
             A( int );              // constructor for ints only
          };
 
          A a[3] = { A(1), A(2) };  // error, no default constructor
 
          class B
          {
          public:
             B();                   // default constructor declared
             B( int );
          };
 
          B b[3] = { B(1), B(2) };  // OK
                                    -♦-