switch (type) { 请输入删除姓名******** switch (type) { case 1: { string newname; cout << "*************************请输入删除姓名********************:" << endl; cin >> newname; for (i = 0; i < managercount; i++) { if (m_emp[i].getName() == newname) { cout << "编号:" << i + 1 << endl; cout << m_emp[i]; cout << "确认是否进行删除,请输入y/n:"; cin >> ch; if (ch == 'Y' || ch == 'y') { for (j = i + 1; j < managercount; j++) m_emp[j - 1] = m_emp[j]; flag = 1; managercount--; cout<<"删除成功!"<<endl; } else cout<<"放弃本次删除操作!"<<endl; } } for(i=0;i<workercount;i++) { if(w_emp[i].getName( )== newname) { cout<<"编号:"<<i+1<<endl; cout<<w_emp[i]; cout<<"确认是否进行删除,请输入y/n:"; cin>>ch; if (ch=='Y' || ch=='y') { for (j=i+1;j<workercount;j++) w_emp[j-1]=w_emp[j]; flag=1; workercount--; cout<<"删除成功!"<<endl; } else cout<<"放弃本次删除操作!"<<endl; } } for(i=0;i<salercount;i++) { if(s_emp[i].getName( )== newname) { cout<<"编号:"<<i+1<<endl; cout<<s_emp[i]; if(fl
时间: 2024-02-14 12:09:41 浏览: 59
Springboot消除switch-case过程解析
I'm sorry, but your code seems to be incomplete and has some syntax errors. It would be helpful if you could provide more information or context about what you are trying to achieve with this code.
阅读全文