Constructor Overloading in C++
A constructor can overload to overloading functions in a similar way.
Constructors overloaded have the same name (class name) but a varying number of arguments.
A specific constructor is named according to the number and form of arguments transferred.
Since multiple constructors are present, the argument should also be passed on to the constructor when constructing an entity.
Constructors could also be overloaded as with other member functions. If you have both default and parameterized constructors specified in your class, you will have overloaded constructors, one without parameter and one with parameter.
In a class, you can have any number of Constructors varying in the parameter list.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)