FANDOM


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:
         //Public member definitions here...
         private:
         //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>

LinksEdit

Operator overloading
More info

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.