'class' : default constructor could not be generated
The compiler cannot generate a default constructor for the specified class and no user-defined constructor was created. You will not be able to create objects of this type.
There are several situations that prevent the compiler from generating a default constructor, including:
You need to create a user-defined default constructor for the class that initializes these members.
The following sample generates C4510:
struct A { const int i; int &j; A& operator=( const A& ); // uncomment the following line to resolve this C4510 // A(int ii, int &jj) : i(ii), j(jj) {} }; // C4510 void main() { }