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
I need help programing this... In this exercise, you will create a program for the sales manager at Computer Haven, a small business that offers motivational seminars to local comp

Create a function ValueDelta(char inName[], char outName[]) that reads a text file with option specifications and writes the option values as well as Delta. The inName[] file conta

C Program for SORTING OF NUMBERS   main() {           int a[20],i,j,temp,n;           clrscr();           printf("ENTER THE MAXIMUM LIMIT: ");           scan


A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to execute an implied conversion of types. Its purpose is reserved ex

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

Charity Ball Organizer Many charities support good causes, but one of the difficulties each of them has is organizing their fundraising events. After nearly a semester of C progra

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta,

want the codings for these topic in ur experts minds.com

Described multiple inheritance(virtual inheritance)? And explain its advantages and disadvantages? A: It is the procedure in which a child can be derived from more than one pare