However, for example,
int m = 10;
float x = 5.75;
are valid initialization statements for basic data types.
Similarly, when a variable of built--in type goes out of scope,
then compiler automatically destroys the variable.
But it has not happened with the objects.
It is therefore clear that there is need of features of classes to be explored
that would enable us to initialize the objects
when they are created and destroy them when their presence is no longer necessary.
C++ provides a special member function called the constructor
which enables an object to initialize itself when it is created.
This is known as automatic initialization of objects.
It also provides another member function called the destructor
that destroys the objects when they are no longer required.