|
|
@ -142,7 +142,7 @@ void display()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct node tem[1000];
|
|
|
|
struct node tem[1000];
|
|
|
|
int i=0;
|
|
|
|
int i=0;
|
|
|
|
printf("已保存的名学生基本信息:\n");
|
|
|
|
printf("已保存的学生基本信息:\n");
|
|
|
|
FILE *fp=fopen("data.txt","r");
|
|
|
|
FILE *fp=fopen("data.txt","r");
|
|
|
|
while(fscanf(fp,"%s%s%s%d%s",tem[i].stnum,tem[i].stname,tem[i].sex,&tem[i].age,tem[i].detail)!=EOF){
|
|
|
|
while(fscanf(fp,"%s%s%s%d%s",tem[i].stnum,tem[i].stname,tem[i].sex,&tem[i].age,tem[i].detail)!=EOF){
|
|
|
|
printf("学号:%-12s姓名:%-8s\t性别:%-4s\t年龄:%-4d\t备注:%-4s\n",tem[i].stnum,tem[i].stname,tem[i].sex,tem[i].age,tem[i].detail);
|
|
|
|
printf("学号:%-12s姓名:%-8s\t性别:%-4s\t年龄:%-4d\t备注:%-4s\n",tem[i].stnum,tem[i].stname,tem[i].sex,tem[i].age,tem[i].detail);
|
|
|
@ -390,12 +390,14 @@ void _menus2()
|
|
|
|
printf("\t\t\t\t\t*--------5 退出--------------*\n\n");
|
|
|
|
printf("\t\t\t\t\t*--------5 退出--------------*\n\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void end()
|
|
|
|
void end()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char c;
|
|
|
|
char c;
|
|
|
|
printf("按任意键继续!\n");
|
|
|
|
printf("按任意键继续!\n");
|
|
|
|
c=getch();
|
|
|
|
c=getch();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int cpassword()
|
|
|
|
int cpassword()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char mi[100];
|
|
|
|
char mi[100];
|
|
|
|