Home > Back-end >  Written in c language student elective system, how to separate the login name and password of the te
Written in c language student elective system, how to separate the login name and password of the te

Time:06-11

This is part of the program, I would like to give the teacher and the student's login name, how to change?
/* validate student account password */
Void checkAccountandPassword (TotalNode * phead, char * Account, Password, char * int n)
{
While (1)
{
Gets (Account);
/* */
If (0==STRCMP (Account, "GFN))
{
While (1)
{
Printf (" please enter the password: ");
Gets (Password);
If (0==STRCMP (", "123456"))
{
Display_Detailed (phead, Account, n);
return;
}
}
}
The else
{
Printf (" please enter account: ");
}
}

}

/* check students, teacher's account password */
Void checkPerson_Msg (TotalNode * phead, int n)
{
The switch (n)
{
Case 1://student login char studentAccount [20]. Char studentPassword [20].
CheckAccountandPassword (phead, studentAccount studentPassword, n);
break;
Case 2://teachers login char teacherAccount [20]. Char teacherPassword [20].
CheckAccountandPassword (phead, teacherAccount teacherPassword, n);
break;
Default:
Puts (" exception!" );
break;
}
}

/* */

CodePudding user response:

CheckPerson_Msg function the second parameter is not used to distinguish the
Students, you pass in 1, the teacher introduced to 2

CodePudding user response:

reference 1st floor fireyou response:
checkPerson_Msg function the second parameter is not used to distinguish the
Students, you pass in 1, the teacher introduced into 2

Can you help me to write it for me? I received a little??

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related