Properties of constructors:
- They should be declared in public section of a class.
- They are invoked automatically when the object is created.
- They do not have return types, not even void and therefore , they cannot return values.
- Constructors cannot be inherited, through a derived class can call the constructor of base class.
- Like other c++ functions, they can have default arguments.
- Constructors can not be virtual.
- We cannot refer to their address.
- An object with constructor cannot be used as a member of a union.
- They make implicit call to the operators new and delete when memory allocation is required.



0 Comments