Constructor Overloading

C++ Constructor Overloading

The program contains more than one constructor in a class with the same name, and different types of arguments are called constructor overloading.

Calling of constructor depends on the number and types of the argument passed in object.

Syntax

C++ Constructor Overloading Example

Output:

Leave a Comment