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

Global Variables

  • Global variables should be prepended with 'g'.

Justification

  • It's important to know the scope of a variable.

Example 2-10. Global Variables Example

Logger  gLog;
Logger *gpLog;