在编译时候报错:error C2061: syntax error : identifier ‘string’ 分析原因:没有加入 #include<string> using namespace std; 通常是由于std命名空间引起的