A constructor in C++ is a special method that is automatically called when an object of a class is created. Constructor does not have a return value, hence they do not have a return type. constructor name is same as name of class.
Define constructor inside class defination
Define constructor outside class defination