Professional Documents
Culture Documents
Constructors
Contents
• Introduction to Constructor
• Characteristics of Constructor
• Types of Constructor
• Constructors with Default Arguments
Introduction to Constructor
A constructor is a special member function of a class whose
task is to initialize the objects of its class.
Default Constructor
Parameterized Constructor
Copy Constructor
Default Constructor
A constructor that accepts no parameters is called default
constructor.