Hi guys,
I have problem understanding virtual functions??? Like how it works.
My friend asked me some questions
1) What is a static function???
I replied functions to be used without intantiating an object of that class.
2) Can static function be called using this pointer???
I told no!!! but I dont know why??? This is because my funda is not clear.
Need some exaplantion about why???. If possible using day to day life example as like Ganon11 (where I say his explanation for pure virtual functions). It was really good one.
3) What is virtual function???
I know the defination (from book) but the funda is not clear. Please explain with day to day life example .
4) Can virtual functions be made static????
5) Can i call a virtual function from within a constructor????
These are some of the questions I have and I need to make them clear. Please help
Thanks in advance
I have problem understanding virtual functions??? Like how it works.
My friend asked me some questions
1) What is a static function???
I replied functions to be used without intantiating an object of that class.
2) Can static function be called using this pointer???
I told no!!! but I dont know why??? This is because my funda is not clear.
Need some exaplantion about why???. If possible using day to day life example as like Ganon11 (where I say his explanation for pure virtual functions). It was really good one.
3) What is virtual function???
I know the defination (from book) but the funda is not clear. Please explain with day to day life example .
4) Can virtual functions be made static????
5) Can i call a virtual function from within a constructor????
These are some of the questions I have and I need to make them clear. Please help
Thanks in advance
Comment