what is the virtual function overhead, and what is it used
for ? i hope i can get and appropriate answers, thanks a lot....
Answer Posted / vadivel
virtual function supports run-time polymorphrism. Ovarhead
is run-time has to create 'virtual' table.
'Derived' class object can be stored in the 'base' class
pointer. Using 'base' class pointer, client can call base
class method but not in the derived class method; if client
wants to call the derived class method then based method
should declare as virtual.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Whats oop mean?
What is a superclass in oop?
Is this job good for future? can do this job post grduate student?
explain sub-type and sub class? atleast u have differ it into 4 points?
What are the benefits of polymorphism?
What is abstract class in oops?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is purpose of inheritance?
Can private class be inherited?
How to call a non virtual function in the derived class by using base class pointer
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is inheritance in oop?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What is for loop and its syntax?