运行程序出现错误 error: ‘assert’ was not declared in this scope assert(in.is_open()); 解决方法: 加入头文件 #include <cassert>