From a4efc926965c3740a62f32e32d0dd94ff001d0e2 Mon Sep 17 00:00:00 2001 From: "1052720016@qq.com" <1052720016@qq.com> Date: Thu, 10 Jan 2019 10:19:52 +0800 Subject: [PATCH] 4th commit --- 3.c => 4.c | 7 +++---- 3.exe => 4.exe | Bin 110008 -> 110008 bytes 2 files changed, 3 insertions(+), 4 deletions(-) rename 3.c => 4.c (96%) rename 3.exe => 4.exe (75%) diff --git a/3.c b/4.c similarity index 96% rename from 3.c rename to 4.c index e7feb12..5f46268 100644 --- a/3.c +++ b/4.c @@ -33,7 +33,7 @@ void credit(int n) printf("请输入用于存放文件的路径及路径名:"); scanf("%s",fpname); getchar(); - fp=fopen(fpname,"w+"); + fp=fopen(fpname,"a+"); head=(struct student *)malloc(sizeof(struct student)); printf("请输入学生学号 姓名 性别 出生年 月 日 地址 电话 e_mail:"); scanf("%d %s %c %d %d %d %s %s %s",&head->number,head->name,&head->sex,&(*head).birthday.year,&(*head).birthday.month,&(*head).birthday.day,head->address,head->tel,head->E_mail); @@ -67,9 +67,9 @@ int show2(int n) for(i=0;inumber,head->name,&head->sex,&(*head).birthday.year,&(*head).birthday.month,&(*head).birthday.day,head->address,head->tel,head->E_mail); - printf("%d %s %c %d %d %d %s %s %s",head->number,head->name,head->sex,(*head).birthday.year,(*head).birthday.month,(*head).birthday.day,head->address,head->tel,head->E_mail); - fclose(fp); + printf("%d %s %c %d %d %d %s %s %s",&head->number,head->name,head->sex,(*head).birthday.year,(*head).birthday.month,(*head).birthday.day,head->address,head->tel,head->E_mail); } + fclose(fp); } int search1(int n) { @@ -114,7 +114,6 @@ int search2(int n) fscanf(fp,"%d %s %c %d %d %d %s %s %s",&head->number,head->name,&head->sex,&(*head).birthday.year,&(*head).birthday.month,&(*head).birthday.day,head->address,head->tel,head->E_mail); if(strcmp(checkname,head->name)==0) { - for(i=0;inumber,head->name,head->sex,(*head).birthday.year,(*head).birthday.month,(*head).birthday.day,head->address,head->tel,head->E_mail); fclose(fp); return(1); diff --git a/3.exe b/4.exe similarity index 75% rename from 3.exe rename to 4.exe index a398488fdb1955e1052982c0aea2e259f03a2c64..e934f6f8bd7ddfdb376454ea3c932f3b276ac2ed 100644 GIT binary patch delta 6520 zcmZWt3tW^{+CR_BZMY9GfZS#VW&lIQ0YULTiYO&2rm5it2n8>wqo8;fLw6xXz*8Qz zOzW4Xl`T2$hns1*wqD9yyisW>y5@)38oK3bw(A9|j@?)EjQd8xZm^>e6AwTbU`*V2dlQ};UZ;p08x zy8knpvFc@1HOSa{1#sh-SF2pNZ}fSy;sjN#GODUvja6Aj*Vc1i{YMN>SVp_-m@M$g!tZU1R+Pink#^Y`|4C>PeY9syfj8poG@ z$Xhx&{2IesQtbl&!gICzG?1;ie5}_i$}KIw;uRTCsFh-uAeJ^BVnWN$dPeXV?|hGF z%(NP{e4JM>-{oCO`?QH}_YE@?$>pVX>!g7GL3;s{1JdiOsl08#8VV%uxAnx`XU*%=lIs{0&q5oNw3* zWdL@cZ%Ci}Fs#n_Op1I7_|&J3dfO%}lW|N6ue1q&?a1R5Nm)R(mheG-wdBRW^y5B5 z!cjhUpHq3Ue+(+G#$T6TAJ)a~4GbOYa)-iGx3<+^wFyhN?0NV&WD`ErdHeQ*YW)BY zXFAf6j`iAfFdH*kDjKIq;p&V-a$S8vZfNx1u#+EEztX#+TSt85fQM!M-Hq&=wU3ZB zxPB~`*NgulASN*og4G#cNMro~pGIq=d_XxeDl29WZw_dnS$uO~C|%}z18>kgUKx}% z^mZ^N@8eOKalQ2pzROo%Px9aJ90Gv1iE^PQz*cX#_ivn;PNn*1sd$(NX%a$?0?MVd zz!8)zQfW>wzZ)FJi#3Pb-_}5K5049uja&%$-=^}Vz)W5g98bl(CfMwA3KkqId&I8> z{}34*)U|{(=rYKtT)M(;sla}~6#WNnZw@WH{ ziJy~th=kqc$3y#De+xbC;;WfpW)+X!$~-n|s!ja!2m=}Uy@=tIX-$fZQ0OopqwN*E zexjMlAX}@@sH#eBjbSFQ(T37`{;qafZslY%>t(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