Thinking in C++ learning(1)-----C in C++

来源:互联网 发布:湖南特大网络传销案 编辑:程序博客网 时间:2024/06/10 04:43

1.& 语法糖 

2.Make 编译控制 //{L} Global2 带有Global2名字的文件要被连接进来(很像xdoclet)

3.变量的定义:extern, static(两种含义:作用域内不变,指定作用域) and automatic

4.Link: internal linkage 和 external linkage

5.C++ 显示转换
l=static_cast<long>(i);
const int i=0;
const_cast<int *>(&i);
X x;
int* xp = reinterpret_cast<int *>(&x);

6.typedef 的方便之处
typedef struct {
      char c;
} Structure2;
Structure2 a;

7.函数指针
void * (* (*fp1) (int) )[10];

原创粉丝点击