The reason to use separate sections for type definitions, constants, enumerations, nested classes, friends, methods and data members is to improve readability. Most categories can exist for each access level, that is public, protected and private. Friends and data members are always private. When a category is empty, do not include it. Of each category an example is given:
public: // TYPE DEFINITIONS
public: // CONSTANTS
public: // METHODS
private: // ENUMERATIONS
private: // NESTED CLASSES
private: // FRIENDS
private: // DATA
|