Too few initializers were specified for an array of user-defined types or constants.
class A {
public:
A( int ); // constructor for ints only
};
A a[3] = { A(1), A(2) }; // C2073, no default constructor
If an explicit initializer and its corresponding constructor are not specified for an array member, a default constructor must be supplied.
class A {
public:
A();
A( int );
};
A a[3] = { A(1), A(2) };
This article is a derivative work based on Compiler Error C2073 which is provided by MSDN Community Content - Visual C++.
Viewing Details: