Next:
Namespaces
Up:
Basic class semantics
Previous:
Lifetime of an object
Contents
Data access privileges
class
ClassName
{
public:
members with no access restriction
protected:
access by: this, derived classes, friends
private:
access by: this, friends
} ;
a
derived
class is a class which inherits from this (see inheritance below)
a function can be declared
friend
of a class to be able to access its protected and private data
class TheClass {
...
friend void theFriendMethod(void);
};
Leo Liberti 2008-01-12