Constructor Overloading

tutorial and example
tutorial and example

C++ Constructor Overloading

Program contains more than one constructor in a class with same name and different types of arguments is called constructor overloading.

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

Syntax

C++ Constructor Overloading Example

Output: