#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
char ch;'把ch改为字符类型就可以了
while(1)
{
cout<<"1 增加姓名"<<endl;
cout<<"2 删除姓名"<<endl;
cout<<"0 退出"<<endl;
cout<<"请输入你的选项:"<<endl;
cin>>ch;
switch(ch)
{
case '1':cout<<"增加成功"<<endl;break;
case '2':cout<<"删除成功"<<endl;break;
case '0':return 0;
default:continue;
}
}
return 0;
}