摘要: 在C++中,经常需要include一些自己定义的头文件,如果处理不当,很容易出现"multipe definition ....."的错误。闲话少说,先来一个例子:假设定义了如下3个文件:global.h a.cpp b.cpp//global.h:#ifndef _GLOBAL_H_#define _GLOBAL_H_const int a=1;int b;#endif//a.cpp#include <iostream>#include <stdlib.h>#include "global.h"using namespace s 阅读全文
posted @ 2012-07-13 16:12 菜鸟的世界 阅读(16725) 评论(0) 推荐(1) 编辑