摘要:
编写自定义头文件时,原来就是随意的编写一些内容,但是很少去想过头文件的格式; 突然一天,发现自己的头文件里有这么几个小东西 ; #ifndef DAO_H#define DAO_H ... #endif 上面这个有什么详细的意义? 恍惚的记着是为了避免头文件多次调用,造成多次编译,引起重定义的错误; 阅读全文
摘要:
const int x = 50; int* y = (int *)(&x);// same address, but the content is different *y = 200; cout << "x: "<<x<<" address: "<<&x<<endl; cout << "*y: "<<*y<<" address: "<<y<<endl; cout<< 阅读全文