Vc error C2629: unexpected 'class***或error C2501: missing storage-class or type specifiers

可能是

头文件相互包含

如a.h中有include b.h

b.h中有include a.h

 

解决方法:把b.h中include a.h去掉,并把该句加入到b.cpp中。即在b的cpp文件中包含a的头文件,而不是在b的头文件中包含。

 

 

或者可能是

构造函数的参数类型找不到(没包含相应头文件或者类型名写错了)

posted on 2013-04-21 23:50  wps712  阅读(8424)  评论(0编辑  收藏  举报

导航