1)下划线风格
int student_age; (一般用于变量名,函数名)
2)小驼峰风格
int studentAge; (一般用于变量名,函数名)
3)大驼峰风格
int StudentAge; (一般用于“类名”)
4)全部大写
#define MAX_AGE 30 (一般用于宏名)
C++常见命名分格
最新推荐文章于 2024-09-11 12:36:17 发布
1)下划线风格
int student_age; (一般用于变量名,函数名)
2)小驼峰风格
int studentAge; (一般用于变量名,函数名)
3)大驼峰风格
int StudentAge; (一般用于“类名”)
4)全部大写
#define MAX_AGE 30 (一般用于宏名)