代码拉取完成,页面将自动刷新
#include <iostream>
#include "Student.h"
#include "GlobalData.h"
int main() {
while(true){
cout<<"请选择登录类型"<<endl;
cout<<"1.教师"<<endl;
cout<<"2.学生"<<endl;
cout<<"3.退出"<<endl;
int loginType;
cin >> loginType;
if (loginType == 3)
break;
if (loginType == 2){
cout<<"请输入学号"<<endl;
string stuNo;
cin>>stuNo;
cout<<"请输入密码"<<endl;
string stuPsw;
cin>>stuPsw;
CStudent* student = GlobalData::userManager.StudentLogin(stuNo, stuPsw);
if (student == NULL)
break;
student->DoFunction();
}
if (loginType == 1){
cout<<"请输入教师账号ID"<<endl;
int teacherId;
cin>>teacherId;
cout<<"请输入密码"<<endl;
string teacherPsw;
cin>>teacherPsw;
CTeacher* teacher = GlobalData::userManager.TeacherLogin(teacherId, teacherPsw);
if (teacher == NULL){
cout<<"密码错误"<<endl;
break;
}
teacher->DoFunction();
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。