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
wap to count the numof string present in a word

calculate the total resisitance of a series circuit?

Radix sort - C program: Write a program in c to define a radix sort. void main() {  int array[100],n;  int i;  void radix(int *,int);  printf ("How many nos\

The video game machines at your local arcade output coupons depending on how well you played the game, you can redeem 10 coupons for a candy bar, 6 coupons for .a medium soft drink

I need to program a microprocessor that would have a temperature, gas, humidity and PIR sensor connected to it. It would send the data to a PC via a Zigbee and receive commands fro

Help me evaluate suitable OpenCV filters to get an inital working tracking algorithm. In this case it's objects moving on water (sea) and since I have very limited OpenCV knowledge

Function fact explain how the process of recursion works in C++.In your answer assume that the function is called to calculate the factorial of 6?

It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions d


(a) Write a Scheme procedure to evaluate the expression: 7/6+2*5+(3*2+6*7)*4. (b) Write a Scheme procedure to evaluate the expression: 2*(-1+(-3+4*2-7)*3/(3*2)).