没有添加头文件<string>,cout不能直接输出string类的变量。 转载于:https://www.cnblogs.com/cszlg/archive/2012/06/08/2541206.html