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 - protected members _ http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                            Protected Members                         _
   The use of the protected keyword within the body of a class is also an
   extension  to the class syntax designed to support inheritance.  Class
   members within the protected section of a class definition are treated
   as private to the class except that they can be directly accessed by a
   derived  class in the same way as a public member. To the rest of  the
   program,  however,  protected  members still behave as  if  they  were
   private.

   Members of a base class which would normally be private but which  are
   intended  to  be  inherited should be made protected  members  of  the
   class.  The private members of a base class remain private to it.  The
   derived class has no special access to them.

   A  friend of a base class can access only those members of  a  derived
   class  that were inherited from the base class. A friend of a  derived
   class can access the public members of the base class, and any  static
   protected members of the base class.


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