Top Comments
All Comments (18)
-
this is very good for student
-
Great instruction, the only critique is that it would be nice to be able to view the entire code versus the zooming in on a section some times.
-
I hate the word pointer
-
@tronulu if the a base destructor/method is virtual all methods that are derived from it will be virtual
-
in 5:38
he says we "only" need to change the base destructor to virtual BUT
he has also changed the derived destructor to virtual, without mentioning why!
so why does he do that?
-
Virtual functions are great for implementing interfaces. Think of a game class called GameObject that has two functions: virtual void Initialize() and virtual void Update(). You'll be creating many different types of GameObjects such as people, bullets, cars, chess pieces, etc. Instead of writing custom code to initialize and update every object, you'd like to be able to iterate over an array of GameObject pointers. Each derived GameObject implements its own Initialization and Update code.
-
thanx , it realy helpd me to understand the logic very easily and very quickly.
-
basically having virtual functions in base class let the derived class object use their own functions and if derived class don't have the function defined the base class will provide the function. As far as the use u never know when u can run into issue where u might need this type of functionality it is just a type of tool available for disposal :)
-
the purpose of virtual function is to have the priority. i.e let say your base class has function and derived class has a same function as well. If you created a base class pointer and point it to derived class object and call that one function due to the type of the pointer base class function will be executed unless the function is virtual and at that point derived class object function will be able to override the base class function.
-
thanks a bunch.Awesome for noobs as well as refreshing concepts.
thanks, great set of tutorials
rhillner 2 years ago 12
0.0!
thanks for these vids, i've watched them all now
PiratesVersusNinjas 2 years ago 7