Skip to content

Opening book details…

Can I read Understanding C++ Virtual Functions on EtoBox?

Understanding C++ Virtual Functions by Raghavendra Rajendra Basvan is a document available to read on EtoBox.

What is Understanding C++ Virtual Functions about?

A virtual function is a member function declared in a base class that is overridden by derived classes. When a virtual function is called through a base class pointer, the version of the function in the most derived class is executed. This allows for runtime polymorphism. In the example code, class B derives from class A and overrides the virtual show() function. When show() is called using a base class pointer pointing to a B object, the version in B is executed and prints the value of b.

Author
Raghavendra Rajendra Basvan
Language
EN

More by Raghavendra Rajendra Basvan

Browse all works by Raghavendra Rajendra Basvan