+ 1
What is derived class constructor and destructor? I don't understand it
2 odpowiedzi
+ 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.
+ 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.