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

Assignment Help:

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.

 


Related Discussions:- How do you know that your class requires virtual destructor

Crossoword puzzle, find wether specific word is inside a pool of word and w...

find wether specific word is inside a pool of word and what is the direction e.g. north

Define automatic storage classes - computer programming, Define Automatic s...

Define Automatic storage classes - computer programming? The Variables declared within function bodies are automatic by default and automatic variables are declared inside a fu

Computer Science 101, This is what I need help with. "Create a program cre...

This is what I need help with. "Create a program creates an interface allowing the user to select from some other programs I have made one being a money converter and the other ca

Compiler related, Please give me a programming code of first & follow wit...

Please give me a programming code of first & follow with c or c++ laqnguage .When anyone give me the programming code of first & follow please explain every lines with the help

Area under curve , c-program to find the area under the curve y=f(x) betwe...

c-program to find the area under the curve y=f(x) between x=a and x=b integrate y=f(x) between the limits of a and b   #include float start_point, /

#calculate percentge, #write a multilevel c++ program to take marks of 3 su...

#write a multilevel c++ program to take marks of 3 subjects and calculate percentage and display it

Software crisis, defining software crisis As the technology changes ra...

defining software crisis As the technology changes rapidly the requirement for the users' change, to part the growing demand of the user for trade,  business, and personal

Operation on string - c ++ program, Operation on String - C ++ Program: ...

Operation on String - C ++ Program: Write a program to define operations on string in c++. class String {    char *char_ptr;   // pointer to string contents    int le

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd