C++编译错误 :error: explicit qualification in declaration of xxx

C++编译错误 :error: explicit qualification in declaration of xxx

已经存在在命名空间内,再声明函数或者类不要再加限定符,去掉函数前的XX::
例如:

# 不要这样写
namespace threedog {
	void threedog::func(int i);
}
# 修改为:
namespace threedog {
	void func(int i);
}
原创文章 39 获赞 33 访问量 2万+

猜你喜欢

转载自blog.csdn.net/Three_dog/article/details/96133220