How do you know that your class requires virtual destructor, C/C++ Programming

How do you know that your class requires a virtual destructor?

A: If at least your class has one virtual function, you must make a destructor for this class virtual. It will let you to delete a dynamic object by a caller to a base class object. If destructor is non-virtual, then wrong destructor shall be invoked throughout deletion of the dynamic object.

 

Posted Date: 3/16/2013 2:57:43 AM | Location : United States







Related Discussions:- How do you know that your class requires virtual destructor, Assignment Help, Ask Question on How do you know that your class requires virtual destructor, Get Answer, Expert's Help, How do you know that your class requires virtual destructor Discussions

Write discussion on How do you know that your class requires virtual destructor
Your posts are moderated
Related Questions
This assignment document will be distributed from Blackboard assignment folder. Some parts of the assignments will require you to research answers from your text book (you must rea

A name clash happens when a name is described in more than one place. For example, two dissimilar class libraries could give two different classes the similar name. If you try to u

I have a program and I want someone to fix it for me by using basic c language program.

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

In this assignment, you will develop a program named "match" to be used by a dating service to form couples. Given the number of gentlemen, the number of ladies, and a list of acce

In POS system, cashier computer connect to printer using serial rs232 usb or cable. We need to capture data from that connection, and parsing the data to get total amount for every

#question.Write a c++ program to accept and print a 1_d array

Prepare a script for providing Instagram Followers/Likes I need to prepare a panel where my customer able to get Instagram followers or likes automatically. - A panel where I

1. When developing this project in a Win32 Console Applications that includes the precompiled headers, enter in the Name: box, PRJ2[Your Full Last Name][Your First Initial] with no

#questAt a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets wit