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
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is super in oop?
How does polymorphism work?
What is encapsulation with real life example?
Why multiple inheritance is not allowed?
What is encapsulation in ict?
Which language is pure oop?
Who invented oop?
How do you achieve runtime polymorphism?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What are the three main types of variables?
Is data hiding and abstraction same?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
What do you mean by abstraction?
Write a program to sort the number with different sorts in one program ??