Class A {
public:
A(int i = 0, int k = 0) {} // default constructor WHY ??
~A() {}
};
int main()
{
A a; // This creates object using defined default
The feature of constructor overload allow the compiler to infer which constructor to call based on the passed arguments. The default constructor is just the constructor which is resolved for no arguments, as in
A a;
or
A a=A();
And again due to parameters overloading only a single constructor can be resolved for each set. So, if all parameters have default values => it is ok to call 'A()' => it is the default constructor.