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 |
What is namespace & why it is used in c++?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
List down the guideline that should be followed while using friend function.
whats the size of class EXP on 32 bit processor? class EXP { char c1; char c2; int i1; int i2; char *ptr; static int mem; };
What does flush do?
What is Pure Virtual Function? Why and when it is used ?
What is the latest c++ version?
Program to check whether a word is a sub-string or not of a string typed
What is a smart pointer?
Is c++ an oop?
What is abstraction with real time example?
Is map thread safe c++?