Define virtual destructor?, C/C++ Programming

Define Virtual Destructor?

Posted Date: 3/15/2013 5:18:28 AM | Location : United States





Q: Define Virtual Destructor?

A: By using virtual destructors, one can destroy objects without knowing their type - the correct destructor for the object is invoked by the virtual function mechanism. Note down that destructors can also be declared such as pure virtual functions for abstract classes. if someone else will derive from your class, and if someone else will say "new Derived", where "Derived" is derived through your class, and if someone else will say delete p, where the actual object''s type is "Derived" though the pointer p''s type is your class.

 

 

Posted by | Posted Date: 3/15/2013 5:18:50 AM


Related Discussions:- Define virtual destructor?, Assignment Help, Ask Question on Define virtual destructor?, Get Answer, Expert's Help, Define virtual destructor? Discussions

Write discussion on Define virtual destructor?
Your posts are moderated
Related Questions
Program to sort a range of numbers with Insertion: /* define variable */ const int max=29000; int list[max]; FILE *fp; clock_t start,end; char any1[8];

Imagine that the server program is a setuid program owned by the root, then after you penetrate the program with a shell running, you become the ROOT and you can remove the whole f

Build a program that calculates a discount for items based on quantity bought each item is $99.99 Ask user to enter the quantity of the items Get the quantity of items from the u


Respected Sir, I want the above written text in a C program


Define the Stream Oriented Data Files? There are two dissimilar types of data files called stream-oriented (or standard) data files and system-oriented (or low-level) data file

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send


I need Profile and optimize a C++ library for speed Project Description: Optimize and profile an existing C++ library for speed. This library uses OpenMP and OpenCV and C+