void oneaccount::showlogin()
{
int len = 3;
string cinname;
string cinpassword1;
string cinpassword2;
while (1)
{
cout << "请设置您的ID:" << endl;
cin >> cinname;
cout << "请设置您的密码:" << endl;
cin >> cinpassword1;
cout << "请再次确认您的密码:"<<endl;
cin >> cinpassword2;
if (cinpassword1 != cinpassword2)
{
cout << "前后两次输入密码不一致,请重新设置密码:" << endl;
continue;
}
else if (cinpassword1 == cinpassword2)
{
accpass[len]._name = cinname;
accpass[len]._password = cinpassword1;
cout << "注册成功!" << endl;
len++;
break;
}
else
{
cout << "出现未知错误!!" << endl;
break;
}
}
}