Answer Posted / guest
Any class that may act as the base of another class should
have a virtual destructor. This ensures that when an object
of the derived class is destroyed that the derived class
dtor will be invoked to destroy it. If the destructor is not
virtual, under some common circumstances, only the base
class' destructor will be invoked, regardless of the class
actually being destroyed. For practical purposes this means
that a class which does, could or should have virtual member
functions, should also have a virtual destructor.
| Is This Answer Correct ? | 18 Yes | 3 No |
Post New Answer View All Answers
What is oops concept with example?
What is encapsulation process?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is difference between multiple inheritance and multilevel inheritance?
What is new keyword in oops?
Why do we need oop?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is overriding in oops?
What are functions in oop?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What is oops in simple words?
What is polymorphism and why is it important?
• What are the desirable attributes for memory managment?
can inline function declare in private part of class?