{
char s[10];
int i=0;
string password="guest";
cout<<endl<<endl<<endl;
cout<<"\t\t**************************************\n";
cout<<"\t\t***** 學生信息管理系統 *****\n";
cout<<"\t\t**************************************\n";
cout<<"\t\t請輸入密碼(7位數):";
s[0]=getch();
while(s[i]!='\r') //輸入回車鍵停止
{
cout<<"*";
s[++i]=getch();
}
s[i]='\0';
cout<<endl;
if(s==password)
cout<<"\t\t歡迎使用學生信息管理系統!\n";
else
{
cout<<"\t\t您輸入的密碼有誤!無權使用\n";
exit(0);
}
system("cls");
}