|
|
|
@ -64,7 +64,7 @@ struct student* Create()
|
|
|
|
|
pNew->next=NULL;
|
|
|
|
|
pEnd->next=pNew;
|
|
|
|
|
pEnd=pNew;
|
|
|
|
|
printf("\t\t\t是否继续录入(y/任意):");
|
|
|
|
|
printf("\t\t\t是否继续录入(y/任意):\n");
|
|
|
|
|
key = getch();
|
|
|
|
|
}
|
|
|
|
|
struct student *pTemp;
|
|
|
|
@ -164,7 +164,7 @@ struct student* Delete()
|
|
|
|
|
}
|
|
|
|
|
pNow->next=NULL;
|
|
|
|
|
pre=pTemp=phead;
|
|
|
|
|
printf("请输入学号:");
|
|
|
|
|
printf("\t\t\t请输入学号:");
|
|
|
|
|
renew: scanf("%s",s);
|
|
|
|
|
while(strcmp(pTemp->id,s))
|
|
|
|
|
{
|
|
|
|
@ -172,8 +172,8 @@ struct student* Delete()
|
|
|
|
|
pTemp=pTemp->next;
|
|
|
|
|
if(pTemp==NULL)
|
|
|
|
|
{
|
|
|
|
|
printf("学号输入有误!!!");
|
|
|
|
|
printf("请重新输入:");
|
|
|
|
|
printf("\t\t\t学号输入有误!!!");
|
|
|
|
|
printf("\t\t\t请重新输入:");
|
|
|
|
|
goto renew;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -237,6 +237,7 @@ void search()
|
|
|
|
|
int x; char s[20];
|
|
|
|
|
printf("\t\t\t请选择查询方式\n1.学号查询\n2.姓名查询\n3.性别查询\n4.年龄查询\n");
|
|
|
|
|
RE: scanf("%d",&x);
|
|
|
|
|
fflush(stdin); //清空缓冲区
|
|
|
|
|
pTemp=phead; int Y=0;
|
|
|
|
|
switch(x)
|
|
|
|
|
{
|
|
|
|
@ -343,7 +344,7 @@ struct student* Change()
|
|
|
|
|
pNow->next=NULL;
|
|
|
|
|
pTemp=phead;
|
|
|
|
|
char s[20];
|
|
|
|
|
printf("请输入要修改学生的学号:");
|
|
|
|
|
printf("\t\t\t请输入要修改学生的学号:");
|
|
|
|
|
scanf("%s",s);
|
|
|
|
|
while(pTemp!=NULL)
|
|
|
|
|
{
|
|
|
|
@ -366,6 +367,7 @@ struct student* Change()
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
system("mode con cols=80 lines=30");
|
|
|
|
|
system("color F5");
|
|
|
|
|
char x=0;
|
|
|
|
|
char m[7];
|
|
|
|
@ -420,7 +422,7 @@ int main()
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("密码错误,请重试!!!\n");
|
|
|
|
|
printf("\t\t\t密码错误,请重试!!!\n");
|
|
|
|
|
goto Re;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|