Class syntax
From C Plus Plus
[edit] Class basics
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.
[edit] Base class declaration
<to be continued>
[edit] Links
Operator overloading More info
