This blog is about providing theory as well as simple executable codes of different programming languages such as java, C, C++, and web programming, etc. This blog will be helpful to the IT students to learn about programming.

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

Friday, February 17, 2023

When do we use virtual function? Differentiate early and late binding.

February 17, 2023 0
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...

Slider Widget