Home / Object Oriented Programming / Define virtual function. When it must be used?

Define virtual function. When it must be used?

Virtual function: Virtual function is a member function in base class which is overridden in derived class.

When we need to solve of function call is done at run time and achieve run time polymorphism then we must use virtual functions.