场景: 原因: 用到string类型,但是没有包含头文件。 解决方法: #include<string> 转载于:https://www.cnblogs.com/SZxiaochun/p/6993645.html