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 / d n gavade
We use Virtual function as Dyanamic Polymorphism.
i.e run time we can passed referencr of derived class into
base class pointer and call the derived class method.Thi
sis its benefit.
But Virtual destructor is also needed when we use virtual
constructor other wise it will cause memory leaks.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is advantage of inheritance?
What is the example of polymorphism?
What is abstraction in oops with example?
what is the drawback of classical methods in oops?
Can abstract class have normal methods?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is the real time example of inheritance?
Are polymorphisms mutations?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
How many human genes are polymorphic?
What do you mean by abstraction?
What is polymorphism in oops with example?
What do you mean by Encapsulation?
What is polymorphism give a real life example?
What does oop mean in snapchat?