C/C++ 拾遗

1. 数据类型

基本类型

  C 中没有 bool 类型的。

 

指针

  C 中没有指针的引用(int *&root),只能用指针的指针(int **pRoot)了。

struct

  C++中的 struct 和 C 的 struct 完全就是两码事了。

 

2. define 和 const

 

3. strlen 和 sizeof

 

4. malloc/free 和 new/delete

 

5. 不同编译器

 

6. static

 

7. a=1; func(a, a++) 和 func(a++, a) 分别传入参数的值为:2, 1 和 1, 2

 

8. 

posted on 2015-10-05 00:26  Excavator  阅读(113)  评论(0编辑  收藏  举报

导航