Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>protected partial access restriction modifier</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 protected               Partial Access Restriction Modifier

 protected access_specifier

        A public object member can be used by any function in the
    program; a private member can only be accessed by members of that
    object or by friend objects. By default, the members of classes are
    private, and the members of structs and unions public.
        If a member is protected, its access is the same as if it were
    private. Note, however, that the member can be used by member
    functions and friends of classes derived from the class (but only in
    objects of the derived type).

   -------------------------------- Example ---------------------------------

              class birdwatch {
                 int num_finches;
                 int num_seagulls;
              protected:
                 int finch_spotted(void);
                 int seagull_spotted(void);
              };


See Also: private public

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