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

Global Constants

  • Global constants should be all caps with '_' separators.

Justification

  • It's tradition for global constants to named this way. You must be careful to not conflict with other global #defines and enum labels.

Example 2-11. Global Constants Example

const int A_GLOBAL_CONSTANT = 5;