ADD: C-CPP CodeSpecification
This commit is contained in:
parent
c23e61fc23
commit
1ef53884cd
24
program/c_cpp/CodeSpecification.md
Normal file
24
program/c_cpp/CodeSpecification.md
Normal file
@ -0,0 +1,24 @@
|
||||
# MY CODE SPECIFICATION
|
||||
|
||||
## INDEX
|
||||
- [Naming](# naming)
|
||||
- [Code](# code)
|
||||
|
||||
---
|
||||
|
||||
## naming
|
||||
|
||||
|格式 |说明 |
|
||||
|---------------|------------------------|
|
||||
|全大写 |常量,宏定义 |
|
||||
|`g_`开头 |全局变量 |
|
||||
|首字母大写 |结构,类 |
|
||||
|`_`开头 |非接口函数 |
|
||||
|
||||
---
|
||||
|
||||
## code
|
||||
|
||||
1. 除特殊需要,嵌套不得超过5层,特别是逻辑部分代码
|
||||
2. 将函数的定义与声明分离,声明放在头文件(接口函数),文件头部(内部函数)
|
||||
3. 再说吧
|
Loading…
x
Reference in New Issue
Block a user