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.
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. When any object of base class has created as pointer and function in base is virtual function then at run time the address of the object has preferred. If function is not virtual function then pointer variable has referred by the class object. In simple words, virtual function has used to call any function by the address of the class.

Templates
Templates are the most recent feature of object-oriented programming. Templates have used to constructs a family of related functions or classes. There are two types of templates in C++. These are as follows:

Function Template:
Function Template helps us to create a set of same type of variables with the help of templates and it helps to remove the function-overloading concept or we can say that it provides certain features with the capability to define a single function for a group of similar function.

Class Template:
Class templates helps us to create a class define action that describes a family of related classes. The class template has declared as same as function for a group of similar function.













17 Responses
Very informative!
great presentation and very informative!
great article
Way over my head.
nice man
Raman,
That’s interesting stuff. I once programmed alot in Assembler and Logo. One of the guys I worked with was a Mr. Singh who was educated in the states and the U.K.
Thanks.
Jacques Berkeley
Interesting.
Very informative article, thanks so much for sharing!
I guess it’s informative–but i’m afraid I find it somewhat incomprehensible. Guess it might help if I was a programmer.
You’re a genius–I’m not. It’s a good thing we have people like you so people like me can function without knowing what you know.
Very Informative.
Well done
Very good!
Guess I need to do some research on this subject…;)
Thanks for the information..very useful
Very clever stuff here!
Nice write up
Informative