cout不能输出字符串,只能一个个字符输出,你可以修改下,case 1: cout<<"信长"; break;后面类似,cout遇到""直接输出里面内容,不管里面是什么,除非是转义字符
看不到你的头文件 知道是什么意思哦
1.#include 2.有了using namespace std;不用using std::string;
没找到你xxx的定义印象里cout能输出字符串来着试试 cout << name.c_str() << endl;