Virtual destructor, C/C++ Programming

What is Virtual Destructor? Describe it.

Posted Date: 2/13/2013 1:22:36 AM | Location : United States





Virtual Destructor:

By using virtual destructors, you can destroy objects without knowing their type - the correct destructor for the object is invoked by using the virtual function mechanism.

Note that destructors can as well be declared as pure virtual functions for abstract classes. Whether someone will derive from your class, and if someone will state "new Derived", in which "Derived" is derived from your class, and if someone will say delete p, where the actual object''s type is "Derived" but the pointer p''s type is your class.

Posted by Aana | Posted Date: 2/13/2013 1:23:51 AM


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

Write discussion on Virtual destructor
Your posts are moderated
Related Questions
Explain about the String Constants in c language? A collection of characters included within a pair of double quotes is treated as string constant. The character may be numbers

Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Ask quIn the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country as

Define Polymorphism? A: Polymorphism let a client to treat distinct objects in the similar way even if they were developed from distinct classes and exhibit different behaviors.

Your program will read two kinds of data from two files: names and predicates. It will read a formal expression from standard input and check whether that expression is syntactical

#quesdifferentiate betweenrelocatable and self relocating program with exampletion..

I need plugin for amibroker using c++ Project Description: Need to prepare plugin for amibroker using c++. Should be system bound after installing. System should show based o

Many modern cryptography algorithms require two numbers that are coprime, or sometimes referred to as relatively prime. Two numbers are coprime if their greatest common divisor is

write c language program that shows stack overflow..