Operators with such extra definitions are called overloaded operators . Member functions exist to operate on members of the class. Nonmember functions must be declared friend functions if they need to access private or protected members of the class directly. You can specify the level of access for a class member using the public , private , and protected member access specifiers . Public members are available to all functions in the program.
Private members are available only to member functions and friend functions of the class.
Protected members are available only to members and friends of the base class and members and friends of derived classes. You can apply the same access specifiers to base classes, limiting access to all members of the affected base class. Function prototypes are required. The free store operators new and delete create dynamic objects of a specified type. References are automatically dereferenced pointers and act like alternative names for a variable.