error: expected ‘;‘ at end of member declaration 和 expected ‘)‘ before ‘&‘ toke等报错问题

error: expected ‘;’ at end of member declaration
error: expected ‘)’ before ‘&’ toke

报错问题

Linux环境下开发C++时,在确保代码没有错误的情况下却出现以下编译报错或其他莫名其妙的报错

	error: expected ';' at end of member declaration
	error: expected ‘)’ before ‘&’ toke

解决方法:
检查头文件是否循环包含,例如a.cpp包含b.h,b.cpp包含c.h,c.cpp包含a.h构成一个环,这种情况就会报错这种问题。

上一篇:Selenium出现 Expected browser binary location, but unable to find binary in default location 错误的解决方法


下一篇:C#创建单元测试