- Constructors have the same name as that of the class they belong to.
- Constructors are executed when an object is declared.
- Constructors have neither return value nor void.
- The main function of constructor is to initialize objects and allocate appropriate memory to objects.
- Though constructors are executed implicitly, they can be invoked explicitly.
- Constructors can have default values and can be overloaded.
- The constructor without arguments is called as default constructor.
- Destructors have the same name as that of the class they belong to preceded by ~ (tilde).
- Similar to constructors, the destructors do not have return type and not even void.
- Constructors and destructors cannot be inherited, though a derived class can call the constructors and destructors of the base class.
- Destructors can be virtual, but constructors cannot.
- Only one destructor can be defined in the destructor. The destructor does not have any arguments.
- Destructors neither have default values nor can be overloaded.
- Programmer cannot access addresses of constructors and destructors.
- TURBO C++ compiler can define constructors and destructors if they have not been explicitly defined. They are also called on many cases without explicit calls in programs. Any constructor or destructor created by the compiler will be public.
- Constructors and destructors can make implicit calls to operators new and delete if memory allocation/de-allocation is needed for an object.
- An object with a constructor or destructor cannot be used as a member of a union.