Encapsulation and access control


Objects encapsulate data. The class describes the encapsulated data and the access control. Remember that member functions are "data" too.
class myClass
{

public:

   [members accessible publicly...]

protected:

   [members accessible privately and in derived classes...]

private:

   [members accessible privately...]

}

Members that are private are not accessible by the user - they are hidden.