http://www.ClipX.Net [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 public                  Global Access Modifier

 public 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 ---------------------------------

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


See Also: private protected

Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson