Class basics Edit

In C++, a class is an aggregate of methods and variables. Both may be of two kinds: instance and class (the later also referred as static). A class is defined using this syntax:

 class-decl = class class-name 
              [ : base-list]
              { (visibility-poster :|member-definition)*  }
 class-name = 'non-qualified-identifier'
 base-list = ([ visibility-poster ] base-class-name)+
 visibility_poster = public | protected | private

as in the following example:

 class great_foo:
         public foo
         //Public member definitions here...
         //Private member definitions here...

The visibility declarations (referred here as "posters") have two distinct meanings. One, for base class-listing (the inheritance of the class being declared), and one for member definitions.

Base class declaration Edit

<to be continued>


Operator overloading
More info