Understanding dynamic binding is little difficult for me. If you can tell how and where I use dynamic binding while programming it would be great help.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our W3Make Forum to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
A function is defined as the piece of instructions in a program in accordance with which our system performs some specific operations. A function consists of two major sections:-
1) Function declaration and definition
2) Calling of function
*Binding* is the process of matching function definitions and function calls with each other at different memory positions in our processor. Binding is also classified into two main types:-
1) Static Binding
2) Dynamic Binding
In dynamic binding, the matching is done at run time rather than the compile time or, basically, the function is called at the run time.
*Execution:-* It is executed with usage of *virtual functions.*
*Virtual functions:-* A function which is declared in the base class and overridden in the child’s class is called a virtual function.It is called to refer to the child’s class using a reference to the base one.
*Key acknowledgements of virtual functions:-*
1. They help with run time polymorphism.
2. A virtual function can be a friend of a virtual class.