《Effective C++ 2nd Edition》读书笔记
Section 1: 改变旧有的C习惯( Shifting from C to C++ )
Item 1: 尽量以 const 和 inline 取代 #define
Perfer const and inline to #define.
Item 2: 尽量以 <iostream> 取代 <stdio.h>
Perfer <iostream> to <stdio.h>.
Item 4: 尽量使用C++风格的注释形式
Perfer C++ style comments.
Section 2: 内存管理 ( Memory Management )
Section 3: 构造函数、析构函数和 Assignment 运算符
( Constructor, Destructor and Assignment Operators )
Section 4: 类与函数之设计与声明
( Classes and Functions: Design and Declaration )
Item 27: 如果不想使用编译器暗自产生的 member function,就应该明白拒绝它
Explicitly disallow use of implicitly generated member functions
you do not want.
Section 5: 类与函数之实现 ( Classes and Functions: Implementation )
Section 6: 继承关系与面向对象的设计 ( Inheritance and Object-Oriented Design )
Section 7: 杂项讨论 ( Miscellany )
Item 45: 清楚知道C++ ( 编译器 ) 默默为我们完成和调用哪些函数
Know what functions C++ sliently writes and calls.
Item 48: 不要对编译器的警告信息视如不见
Pay attention to compiler warnings.
Section 1: 改变旧有的C习惯( Shifting from C to C++ )
Item 1: 尽量以 const 和 inline 取代 #define
Perfer const and inline to #define.
Item 2: 尽量以 <iostream> 取代 <stdio.h>
Perfer <iostream> to <stdio.h>.
Item 4: 尽量使用C++风格的注释形式
Perfer C++ style comments.
Section 2: 内存管理 ( Memory Management )
Section 3: 构造函数、析构函数和 Assignment 运算符
( Constructor, Destructor and Assignment Operators )
Section 4: 类与函数之设计与声明
( Classes and Functions: Design and Declaration )
Item 27: 如果不想使用编译器暗自产生的 member function,就应该明白拒绝它
Explicitly disallow use of implicitly generated member functions
you do not want.
Section 5: 类与函数之实现 ( Classes and Functions: Implementation )
Section 6: 继承关系与面向对象的设计 ( Inheritance and Object-Oriented Design )
Section 7: 杂项讨论 ( Miscellany )
Item 45: 清楚知道C++ ( 编译器 ) 默默为我们完成和调用哪些函数
Know what functions C++ sliently writes and calls.
Item 48: 不要对编译器的警告信息视如不见
Pay attention to compiler warnings.