报错:error: previous definition of
原因如下:
现在有A.h B.h C.h 三个头文件
其中
B.h中 #include<A.h>
C.h中 #include<B.h>且#include<A.h>
这样对于C.h来说,C已经include了B.h,而B.h又已经include了A.h
所以C.h include<A.h>引起了错误,重复include了。
解决办法:在C中删除#include<A.h>
问题解决~
报错:error: previous definition of
原因如下:
现在有A.h B.h C.h 三个头文件
其中
B.h中 #include<A.h>
C.h中 #include<B.h>且#include<A.h>
这样对于C.h来说,C已经include了B.h,而B.h又已经include了A.h
所以C.h include<A.h>引起了错误,重复include了。
解决办法:在C中删除#include<A.h>
问题解决~
https://github.com/ddean2009/blog-auto-publishing-tools
一. 二. 三. ! 作 者 : Yaopengfei(姚鵬飛) 博客地址 : http://www.cnblogs.com
ERROR Failed to compile with 1 error