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>private access restriction modifier</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 private                 Access Restriction Modifier

 private 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.

   -------------------------------- Example ---------------------------------
    Note that in this example, since class members are private by
    default, the private keyword is not actually necessary.

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


See Also: protected public

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