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 |
How do you declare a set in c++?
when can we use copy constructor?
Why c++ is the best language?
what is the size of a class which contains no member variables but has two objects??? is it 1 or 2??
How a macro differs from a template?
Is c++ a good first language to learn?
What is the Maximum Size that an Array can hold?
55 Answers Adobe, FutureSoft, HCL, Infosys, Satyam, TCS, Wipro,
What is a class template in c++?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
Explain the use of this pointer?
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it guys i am waiting for your reply