解决: 1、class 定义之后不要忘记分号 2、主函数写为int main() { } 来源:https://www.cnblogs.com/bristlegrass/p/11429823.html 标签 error