home > resources > c++ coding standard > online version

Chapter 2. Naming scheme

A standard naming scheme is important to ensure that all code looks similar and that every developer can understand new code immediately without have to grasp a new naming scheme first.

One of the main aspects of this naming scheme is that all names should contain key information about the type of language construct is refers to. Additionally, certain prefixes will be used to prevent common error in the use of basic c++ concepts such as pointers, references and scope. This however doesn't involve into a full-blown and difficult to understand and maintain Hongarian notation.

Class Names

  • Use upper case letters as word separators, lower case for the rest of a word
  • First character in a name is upper case
  • No underbars ('_')

Justification

  • Standard naming scheme in very clean OO languages such as Java and C#.
  • Stands out the best amongst the other names formatting, since a class is the basic element in c++ this is a great benefit.

Example 2-1. Class Names Example

class NameOneTwo
class Name