A5下载 - 努力做内容最丰富最安全的下载站!

A5站长下载站

当前位置:A5下载 > 书籍教程 > 程序语言 > C/C++教程 > Google C++ 编程规范
Google C++ 编程规范

Google C++ 编程规范

  • 软件大小:441 KB
  • 软件语言:简体中文
  • 更新时间:2010-10-22
  • 软件类型:国产软件 / C/C++教程
  • 运行环境:PDF
  • 软件授权:免费软件
  • 官方主页:http://
  • 软件等级 :
  • 软件厂商:zhangyi
立即高速安全下载
  • 介绍说明
  • 下载地址
  • 精品推荐
  • 相关软件
  • 网友评论

Google C++ 编程规范目录
一、头文件.4
1. #define的保护.. 4
2. 头文件依赖..... 4
3. 内联函数 5
4. -inl.h文件..... 5
5. 函数参数顺序(Function Parameter Ordering)........5
6. 包含文件的名称及次序...6
二、作用域.7
1. 命名空间(Namespaces)7
2. 嵌套类(Nested Class)... 93. 非成员函数(Nonmember)、静态成员函数(Static Member)和全局函
数(Global Functions)9
4. 局部变量(Local Variables).10
5. 全局变量(Global Variables)....... 10
三、类.......11
1. 构造函数(Constructor)的职责......11
2. 默认构造函数(Default Constructors)....... 12
3. 明确的构造函数(Explicit Constructors)...12
4. 拷贝构造函数(Copy Constructors)....13
5. 结构体和类(Structs vs. Classes).......14
6. 继承(Inheritance)........14
7. 多重继承(Multiple Inheritance)....... 15
8. 接口(Interface).... 15
9. 操作符重载(Operator Overloading)16
10. 存取控制(Access Control)........16
11. 声明次序(Declaration Order).17
12. 编写短小函数(Write Short Functions)..17
四、Google特有的风情..... 18
1. 智能指针(Smart Pointers). 18
五、其他C++特性.....19
1. 引用参数(Reference Arguments)....19
2. 函数重载(Function Overloading).....19
3. 缺省参数(Default Arguments). 20
4. 变长数组和alloca(Variable-Length Arrays and alloca())....... 20
5. 友元(Friends)20
6. 异常(Exceptions).20
7. 运行时类型识别(Run-Time Type Information, RTTI) 22
8. 类型转换(Casting) 22
9. 流(Streams)..23
10. 前置自增和自减(Preincrement and Predecrement).24
11. const的使用(Use of const).....24
12. 整型(Integer Types)25
13. 64位下的可移植性(64-bit Portability).. 26
14. 预处理宏(Preprocessor Macros)...27
15. 0和NULL(0 and NULL)...27
16. sizeof(sizeof).....28
17. Boost库(Boost) 28
六、命名约定....29
1. 通用命名规则(General Naming Rules)....29
2. 文件命名(File Names). 30
3. 类型命名(Type Names)........31
4. 变量命名(Variable Names)31
5. 常量命名(Constant Names)....... 31
6. 函数命名(Function Names)........32
7. 命名空间(Namespace Names). 32
8. 枚举命名(Enumerator Names).32
9. 宏命名(Macro Names)33
10. 命名规则例外(Exceptions to Naming Rules)......33
七、注释...34
1. 注释风格(Comment Style).34
2. 文件注释(File Comments)..34
3. 类注释(Class Comments)..34
4. 函数注释(Function Comments)........ 35
5. 变量注释(Variable Comments)36
6. 实现注释(Implementation Comments) 37
7. 标点、拼写和语法(Punctuation, Spelling and Grammar). 38
8. TODO注释(TODO Comments).38
八、格式...39
1. 行长度(Line Length)....39
2. 非ASCII字符(Non-ASCII Characters)....40
3. 空格还是制表位(Spaces vs. Tabs)..... 40
4. 函数声明与定义(Function Declarations and Definitions).40
5. 函数调用(Function Calls)... 42
6. 条件语句(Conditionals).......43
7. 循环和开关选择语句(Loops and Switch Statements)..44
8. 指针和引用表达式(Pointers and Reference Expressions).45
9. 布尔表达式(Boolean Expressions).. 46
10. 函数返回值(Return Values)..... 46
11. 变量及数组初始化(Variable and Array Initialization)...... 46
12. 预处理指令(Preprocessor Directives). 46
13. 类格式(Class Format).......47
14. 初始化列表(Initializer Lists)...48
15. 命名空间格式化(Namespace Formatting)....48
16. 水平留白(Horizontal Whitespace)........ 49
17. 垂直留白(Vertical Whitespace)..... 50
九、规则之例外.52
1. 现有不统一代码(Existing Non-conformant Code)........52
2. Windows代码(Windows Code).......52
十、团队合作....53

下载地址

  • PC版

本地下载

相关软件

查看所有评论+

网友评论

网友
您的评论需要经过审核才能显示

本类排名

本类推荐

装机必备

换一批

相关资讯

公众号