C++ – Virtual Mechanism in C++

Hello Friends, Today, in this article we will discuss, how Virtual mechanism is being handled in compiler level . The virtual mechanism mostly used to accomplish the dynamic polymorphism, which we discusses in one of the previous blog C++ – Dynamic Polymorphism. Let's go through the following example. We have a class, named "house_address" as … Continue reading C++ – Virtual Mechanism in C++

C++ – Automatic type conversion for user defined data types

Hello Friends, Today In this article we will discuss about the /automatic Type Conversation in case of user defined types. We have seen compiler does the type conversion in case of built in data types. Sample code 1: void fun(int){ } int main(){ fun('c');// Calls the fun(int) return 0; } In the above case compiler … Continue reading C++ – Automatic type conversion for user defined data types

C++ – Dynamic Polymorphism

Hello Friends, Today, in this article we will mostly discuss about Dynamic Polymorphism and the difference between Static Polymorphism and Dynamic Polymorphism . Static Polymorphism : If function call binding is performed at compile time. This is also known as Compile time binding / Early binding. (Please refer to previous blog for details of Static Polymorphism :  C++ – Static Polymorphism  ) … Continue reading C++ – Dynamic Polymorphism

C++ – Static Polymorphism

Polymorphism: In programming language we can say : Different functions can have the same name and if programmer call a function, which one to be executed is decided based on the arguments or the type of parameters that invokes the function. Function call binding: Connecting a function call to function body is known as function binding. … Continue reading C++ – Static Polymorphism

C++ – Different between Abstract Class and Interface

In this article we will discuss about the difference between Abstract class and Interface. Abstract Class: An abstract class is, conceptually, a class which contain at least one pure virtual function. It can’t be instantiated as it contains pure virtual function, but it can have implementation in it. Interface: Interface is a class which contains … Continue reading C++ – Different between Abstract Class and Interface