Chap 3. General Concepts
* std
standard lib中所有id都在std namespace中
而C/C++ *.h中的id在global scope中
* new head file
Q:C++ standard lib头文件都没有后缀?
Chap5 STL
*组成
STL = container + iterator + algorithm
* key attributes
Generic
通过Adapters/Functors 可以补充、约束或定制算法
Q: 多了几种不同的cast关键字什么用意?
Chap 8 Functors
* 将对象象function一样用
重载 operator(...)
void foo() {
statements ...
}
class FunctionObjectType {
public:
void operator(){
statements ...
}
};
FunctionObjectType f;
f()