how do you know that your class requires a


How do you know that your class requires a virtual destructor?

A: If at least your class has one virtual function, you must make a destructor for this class virtual. It will let you to delete a dynamic object by a caller to a base class object. If destructor is non-virtual, then wrong destructor shall be invoked throughout deletion of the dynamic object.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: how do you know that your class requires a
Reference No:- TGS0211585

Expected delivery within 24 Hours