Compare commits
2 Commits
c93071a565
...
1ef53884cd
Author | SHA1 | Date | |
---|---|---|---|
1ef53884cd | |||
c23e61fc23 |
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. 再说吧
|
@ -1,5 +1,8 @@
|
||||
# ANSI转义字符归纳表
|
||||
|
||||
## 在代码中检测是否支持ANSI C
|
||||
`#if __STDC__ == 1`
|
||||
|
||||
---
|
||||
|
||||
## **1. 文本样式控制**
|
||||
|
@ -5,6 +5,7 @@
|
||||
- [预定义宏](#预定义宏)
|
||||
- [ifdef](#ifdef)
|
||||
- [ifndef](#ifndef)
|
||||
- [undef](#undef) : 若要修改一个宏,先移除再定义
|
||||
- [endif](#endif)
|
||||
- [pragma](#pragma)
|
||||
- [error](#error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user