Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - virtual functions _ http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                            Virtual Functions                         _
   A  virtual  function  is a public or protected member  function  of  a
   public  base class that can be redefined in a derived class, and  once
   redefined  can  be  addressed  through the  medium  of  a  pointer  or
   reference to the base class. Virtual functions are the means by  which
   the late binding mechanism is defined for C++.

   Virtual functions are normally invoked through a reference or  pointer
   of  a public base class, with the actual function to be  called  being
   determined  at  run time (dynamic binding). The  function  invoked  is
   determined  by  the  class  type of the object  that  the  pointer  or
   reference is actually referring to at that time and may also be called
   or determined statically (at compile time).

   The  virtual  function type is not the default  for  member  functions
   since  it  involves  an extra pointer indirection in each  call  to  a
   virtual  function. C++ allows the programmer to specify  which  member
   functions require the capabilities of a virtual function.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson