float subject::getresult (char N[])
{
studentname *p;
p = first;
while(p)
{
if(strcpy(p->tname ,N)==0)
return p->result;
p = p->Next ;
}
return -1;
}
void subject::getkname (char N[])
{
strcpy(N,kname);
}
void subject::setkname (char N[])
{
strcpy(kname,N);
}
void subject::findstudent(studentdb *P)
{
studentname *newcode = new studentname;
newcode->Next=NULL;
first = newcode;
studentname *T = first;
studentdb *K = P->Next;
while(K)
{
course *Y = K->stu.retroot();
if(Y ==NULL)
{
K = K->Next;
continue;
}
if(Y!=NULL)
Y = Y->Next;
while(Y)
{
if(strcmp(Y->cname,kname)==0)
{
studentname *Acode = new studentname;
char Name[20];
K->stu.getname(Name);
strcpy(Acode->tname,Name);
Acode->result = Y->grade;
Acode->Next = T->Next;
T->Next = Acode;
activestudnet = activestudnet + 1;
break;
}
Y = Y->Next;
}
K = K->Next;
}
return ;
}
///////////////////////////////////////////////////////////////////////////////////
void tuichu()
{
system("cls");
cout<<"\n\n\t\t\t谢谢你使用选修课小系统\t再见\n\n"<<endl;
cout<<"\n\t 如果你觉得此软件有修改及补充之处,请按以下方式联系我们,"
<<"\n\t提出你的宝贵意见.我们将不断地改进并及时的公布新版本。谢谢!!\n\n"<<endl;
cout<<"\t\t联系方式:\n"
<<"\t\t 姓名:郑德锋\n\n"
<<"\t\t 电话:0594-2657094\n\n"
<<"\t\t Email:cyan_studio@163.com\n\n"
<<"\t\t 学校地址:莆田学院36号0443信箱\t邮政编码:351100\n\n\n"<<endl;
getch();
exit(-1);
}
//////////////////////////////////////////////////////////////////////////////////
//总菜单
char menu()
{
int k=0;
char a[3],c,i;
system("cls");
cout<<endl<<endl;
cout<<"\t\t\t\tC++课程设计课题\n\n"<<endl;
cout<<"\t\t********************************************\n"
<<"\t\t* *\n"
<<"\t\t* 选修课小系统 *\n"
<<"\t\t* *\n"
<<"\t\t* *\n"
<<"\t\t* 操作方式: *\n"
<<"\t\t* 1.选修课系统学生端 *\n"
<<"\t\t* *\n"
<<"\t\t* 2.选修课系统管理端 *\n"
<<"\t\t* *\n"
<<"\t\t********************************************\n"<<endl;
while(1)
{
cout<<"\n\t\t请选择登入方式: ";
cin>>a;
if(strlen(a)==1)
{
for(i='1';i<='2';i++)
{
c=i;
if(c==a[0])
return c;
}
}
cerr<<"\n\n\t\t\t\t输入有误!\n"<<endl;
k++;
if(k>2)
{
system("cls");
cerr<<"\n\n\n\t\t~~提示~~:错误输入次数超过三次,你将被强制退出!!\n\n"<<endl;
cout<<"\t\t按任意键继续"<<endl;
getch();
tuichu();
}
}
}
///////////////////////////////////////////////////////////////////////////////////
//选修课系统端操作
char custom()
{
char A[10];
char b;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页