[ERROR]
No default constructor was available for the specified class/struct. The compiler will supply a default constructor only if user-defined constructors are not provided in the same class/struct and there are default constructors provided in all base/member classes/structs.
class A {
public:
A(int i); // constructor with non-void parameter
A(); // default constructor
};
If you provide a constructor that takes a non-void parameter, then you must also provide a default constructor. Otherwise, if you do not provide a default constructor, you must call the constructor with parameters.
class A {
public:
A(int i);
};
A a(3); // constructor call with parameters