A default constructor is any constructor that has no argumentsor where all required arguments are assigned default values. Thelatter provides a useful means of overloading a default constructorwithout incurring otherwise unnecessary code duplication.Consider the following class definition:class complex {double re, im;public:complex (): re {0}, im {0} {}complex (double real): re {real}, im {0} {}complex (double real, double imaginary): re {real}, im{imaginary} {}// ...}Although the constructors are relatively trivial, the classdefinition is much more verbose than it needs to be. Essentially wehave three constructors all doing exactly the same job. We coulduse in-class initialisation to eliminate the unnecessary defaultinitialisations in the constructors:class complex { double re {0}, im {0};public:complex () {}complex (double real): re {real} {}complex (double real, double imaginary): re {real}, im{imaginary} {}// ...}However, because all three constructors are essentially doingthe same thing, it makes sense to combine them into a singledefault constructor with default arguments:class complex {double re {0}, im {0};public:complex (double real=0, double imaginary=0): re {real}, im{imaginary} {}// ...}