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 - derived classes _ http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                             Derived Classes                          _
   A derived class is a class which inherits its data members and  member
   functions from one or more previously defined classes. The class which
   a derived class inherits from is known as a base class.

   A derived class can itself behave as a base class allowing a chain  of
   classes (class hierarchy) to be constructed.

   A  derived  class inherits all the members of the base class  and  can
   access  the public and protected members of the base class or  classes
   as  if they were its own. It has no access to the private  members  of
   the  base  class.  A derived class may add its own  data  members  and
   member functions. Inherited members of a derived class can in turn  be
   inherited by a further class derived from it.

   In order to support inheritance the class syntax is extended so that a
   derivation  list  of classes is added to the class header.  This  list
   specifies  the base classes from which the class being defined  is  to
   inherit. The syntax for the class header is

   class Derived : public Base1, ....private BaseN
   {
   // class body
   };


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