by Dinesh Thakur Category: Classes in C++

Early Binding:Early Binding Always Occur in the Polymorphism, when we pass the Reference of a sub Class into the Pointer Object of Base Class, then the Member Functions Are never to be Override. When we execute the Program then Compiler knows this thing. This is called as Early Binding. And the Compiler will Execute the Member Functions of Base Class and this will never overrides the Body of the Sub Class Member Function. This is known as the early binding.

Late Binding: In the Late Binding the Compiler never knows About the Code. Means what the Code will do. All the Code is understood at the Time of Execution This is called as Late Binding. As we Know that Late Binding is Performed By using the virtual Functions. Virtual Means Function must be Override. When the Compiler Finds out the Word Virtual at the time of Execution then this will override the Body of the Function of Base Class with the Function of sub Class. When we pass the Reference of the Sub Class into the Pointer Object of the Base Class then the Body of the First Function will be Override by the Sub Class Because the Base Class Member Function is declared with the virtual keyword and the virtual means function must be override.


About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Search Content

Popular Article