+ 1

What is derived class constructor and destructor? I don't understand it

8th Oct 2016, 8:33 PM
2 Answers
+ 2
constructor is special member function in the class it has no return type and same name as the class name.it is invoked or called when object is created to a respected class. derived class constructor means in the inheritance concept we can extend class or derive the new class from the base class or previous class.is know as the derived class.when we declare constructor and destructor in derived class is call derived class constructor and destructor.
1st Nov 2016, 2:33 AM
Kasireddy venkateswarlu
Kasireddy venkateswarlu - avatar
+ 1
Constructor is a menber function of the class. It has tha same name of its class. You can create parameters as you wish inside a constructor. After you have a constructor you use a destructor de free that space in memory.
9th Oct 2016, 3:54 AM
Tiago J Goncalves
Tiago J Goncalves - avatar