Virtual Function and Templates in C++

Virtual Function and Templates in C++

Virtual means existing in effect but not in reality. Virtual function has use for run time polymorphism. A function declared virtual by writing keyword virtual in front of function. When we want to call any same name function by inheritance in the classes then we need to use the concept of virtual function because virtual function helps us to consume the memory space according to the calling at run time.

Video of the Day