Virtual functions are used in object-oriented programming to achieve polymorphism. In particular, virtual functions are used in the following scenarios:When a base class pointer points to an object of the derived class, and we want to call a member function of the derived class through the base class pointer. This is known as runtime polymorphism, and it requires the use of virtual functions.When a base class has one or more functions that are intended to...
Showing posts with label Difference early binding and late binding. Show all posts
Showing posts with label Difference early binding and late binding. Show all posts