class Account
{
public:
string name,pw;
int i;
const string map[3][2];
Account()
{
const string map[3][2] = {
{"user1", "123455"},
{"user2", "asdfasdf"},
{"user3", "sb"}
};
}
void Login()
{
while(cin >> name >> pw)
{
for(i = 0; i < 3; i ++)
{
if(map[i][0] == name)break;
}
if(i == 3) cout << "用户名输入错误,请重新输入\n";
else if(map[i][1] != pw)
cout << "密码输入错误,请重新输入\n";
else break;
}
cout << "欢迎进入金拱门管理系统"<<"-----"<<name << endl;
}
void Goout()
{
while(cin >> name>>pw)
{
for(i = 0; i < 3; i ++)
{
if(map[i][0] == name)break;
}
if(i == 3) cout << "用户名输入错误,不能退出系统\n";
else if(map[i][1] != pw)
cout << "密码输入错误,不能退出系统\n";
else break;
}
cout<<"欢迎下次登陆金拱门管理系统"<<"-----"<<name<< endl;
}
};