Vc++ 6.0 如何避免重复包含一个头
摘要:
有下面的自定义结构体,定义在sample.h中。--------------------------------------------typedef struct sample{int trueNumber;double feature[13]; }SAMPLE;--------------------------------------------类A,类B都#includesample.h,主程序都调用了类A,类B;就会出现error C2011: ''sample'' : ''struct'' type redefinition解决方法:写上宏定义:---------------- 阅读全文
posted @ 2011-01-08 22:27 cy163 阅读(375) 评论(0) 推荐(0)
浙公网安备 33010602011771号