Box() // constructor
This is an simple example of constructor which is shown as above. In this an object is initialized and how it is created is shown. You will find that the box named constructor is created in the program. The name of the constructor and the class should be similar which is also shown. After initialization the value of objects are also assigned in the program. This is the most simplest and easiest program of constructor in C++.