What is virtual destructors? Why they are used?
Virtual destructors in C++ are used to avoid memory leaks especially when your class contains unmanaged code, i.e., contains pointers or object handles to files, databases or other external objects. A destructor can be virtual. ... Now, suppose you create an instance of the Derived class using a Base class pointer.
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program that will produce the ff. output. "what fruit will you buy? 1)apple 2)orange 3)mango ENTER CHOICE (1,2 or 3)> HOW MANY WILL YOU BUY?> THAT WILL COST XX.XX
Can c++ do everything c can?
How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?
what is oops
How do I make turbo c++ full screen?
How to construct virtual constructor
6 Answers CIStems Software, Symphony,
What is endl c++?
What is stl containers in c++?
Is c++ faster than c?
What are activex and ole?
Which should be more useful: the protected and public virtuals?
The "virtual" specifier in a member function enables which one of the following? a) Monmorphism b) Late binding c) Metamorphism d) Solomorphism e) Inheritance