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

Answer Posted / melos

If the class will be derived from and it will need a virtual
destructor so that the destructor of the derived class will
be invoked if it referenced using the pointer to the base class.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What character terminates all character array strings a) b) . c) END

787


What is scope operator in c++?

652


Explain dangling pointer.

768


Why do we need constructors in c++?

741


What is a linked list in c++?

653






What is constructor c++?

767


What are the two types of comments?

663


What is c++ w3school?

738


Is ca high or low level language?

669


What are literals in C++?

676


Can you use the function fprintf() to display the output on the screen?

787


How many types of comments are there in c++?

655


What is the basic structure of c++ program?

662


What is malloc in c++?

632


There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

2622