| Use access control
|
Whenever possible limit access to member data and
functions. |
| Prefix data members
with "m_" |
Class data members should be prefixed with
"m_". The variable name following the "m_" should follow the normal variable naming conventions. |
| Prefix static data members
with "g_" |
Class data members that are static (shared between all
occurrences of the class) should be prefixed with "g_". The variable name
following the "g_" should follow the normal variable
naming conventions. |
| Order class members |
Declare class members with the most public member
access before the more limited access members. The easiest way to do this is to use the file-templates when creating new files.
- Class life-cycle (constructors, destructors, initialization)
- Public
- Protected
- Private
- Overrides
|