Project code more and more, variables and so on, the name is too difficult to understand. Let's go back and learn the naming act.
Transferred from: http://blog.csdn.net/hackmind/article/details/6607954
1. File name: mmmm_nnnn
2. Class naming "struct, enum, type definition (typedef), same." 】
"The first letter of each word of the type name is capitalized and does not contain underscores: mxxxnxxx"
3. Variable naming
MMMM_NNNN: Normal variable
Mmmm_nnn_: Member Variable
G_MMMM_NNN: Global Variables
4. Constant naming: Kplayername
" K followed by the words beginning with capital letters."
5. Function Name: Checkplayercookie ()
"Regular functions use case blending, and the value and set function require matching with the variable name."
6. Name space naming: Google_awesome_project
"Namespaces, named in lowercase letters, and based on the project name and directory structure."
7. Enumeration naming: Same constants or macros. kenumname or enum_name .
8. Macro variable: My_macro_that_scares_small_children
GOOGLE Style naming method