What is virtual function?
While derived class overrides the base class method by redefining the same function, after that if client wants to access redefined the method from derived class by a pointer from base class object, then you must describe this function in base class as virtual function.