when can we use virtual destructor?

Answer Posted / yaggu

Basically, the characteristics it self defines, that
constructor can not be virtual but overloaded while in the
inverse to this, the destructor can not be
overloaded....means there may be more than one constructors
in class and when you create the object of the class,
constructor invokes and when you do not need at the same
time though you define more than one constructors but with
only one destructor we can destroy the object.....that is why...

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a hashmap c++?

560


How does code-bloating occur in c++?

732


What is split a string in c++?

682


What does asterisk mean in c++?

574


What is array in c++ pdf?

539






What is a set in c++?

522


What are the advantages of using pointers in a program?

666


What is the use of seekg in c++?

585


What do you mean by const correctness?

618


What is the limitation of cin while taking input for character array?

1435


Why the usage of pointers in C++ is not recommended ?

885


What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

605


What is scope resolution operator in c++ with example?

547


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

621


what is data encapsulation in C++?

595