Can a class in c++ have multiple destructors?


4/10/2019 6:55:48 PM

Narendra Kumar

4 Answers

New Answer


No. Each class has only one destructor.


No , The class can has a many constructors , but only one destructor ; cause there is no meaning to a class has a many destrucors


Multiple constructors - yes; Multiple parents - unfortunately yes; Multiple destructors - no.


No, what would you like to do with it ? https://www.geeksforgeeks.org/destructors-c/ Can there be more than one destructor in a class? No, there can only one destructor in a class with classname preceded by ~, no parameters and no return type.