Constructors & Destructors
This lesson introduces the concept of constructors, destructors, how to declare and call them.
We'll cover the following...
Introduction
A constructor is used to initialize member variables when an object is declared. It is automatically called at the time when the object of the class is declared.
Note: A constructor is a member function that is usually
public
.
Also keep in mind that unlike other methods defined inside a class, a constructor cannot return a value.
...