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
What is static in oop?
what is different between oops and c++
What is persistence in oop?
Why do we need oop?
What are the features of oop?
Templates mean
What is class encapsulation?
What is difference between abstraction and encapsulation?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What is polymorphism explain its types?
Why interface is used?
what is difference between class template and template class?
Can we define a class within the interface?
Write a program to reverse a string using recursive function?
What is difference between inheritance and polymorphism?