The core idea: to describe exactly what the variable represents.
A good name is usually the expression of what, not how.
The variable name is exactly 8 to 15.
If you want to add qualifiers, then add to the last. For example: Revenutotal or Revenueaverage.
Variables that are tags should not have "flag" and should use enumerations and named constants. ‘
The temporary variable is also called "tmp" and should reflect its purpose.
Some of the most useful Boolean variables are: Done, error, found, success, or OK.
such as: SourceFile replaced with Sourcfilefound.
Enumerations are best prefixed by the fact that the quantities belong to a group.
Especially for C + +:
1. I and J are integer subscripts.
2. P is a pointer.
3. Constants, typedef, and preprocessing macros all uppercase.
4. The variable name and function name use camel-style.
5. Do not underline, unless it is a g_val class.
C + + code naming recommendations