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 - static class members: visibility http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   Static Class Members: Visibility
   Constructors  may  be  made  private, public  or  protected.   In  the
   majority  of cases all class constructors are declared in  the  public
   section  of  the  class definition. A class with all  private  or  all
   protected constructors is known as a private class. The only way  that
   an  object of such a class can be created is through the medium  of  a
   friend  class  or  function. There are  situations  where  having  all
   protected  constructors,  and  no friends, might be  of  benefit,  for
   example, in an abstract data type as the base class for a hierarchy of
   derived classes, where the base class is not intended to have objects.
   See the section on Inheritance for more details.

   In  a  class with multiple constructors it might be  intended  that  a
   certain  type of class object definition should only be allowed to  be
   carried  out by class member functions or friends, in which case  that
   particular  constructor  may be made private or  protected  while  the
   others remain public.


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