virtual member function....
I am very new to this.......
somebody can explain well the use of virtual member function....???
The difference between how virtual and non-virtual member functions are called???
Re: virtual member function....
You can search on google for detail Or ask some point where you are unable to understand.
In c++ two types of polymorphism One is Compile time : By function overloading,operator overloading and template also.
and second is Run Time polymorphism: by Virtual function
>>> By the use of virtual function, we can override the function ( b/w base and derived class)
I am from Base
Because It will never call to derived because No run time polymorphism support here.
If you write virtual keyword before function then
I am from Derived
Because It will call to derived because run time polymorphism support because of writing virtual.
For detail you can see this thread.
|All times are GMT +5.5. The time now is 20:00.|