diff --git a/hhh3.c b/hhh3.c new file mode 100644 index 0000000..aeae27e --- /dev/null +++ b/hhh3.c @@ -0,0 +1,149 @@ +void shanchu() +{ + system("cls"); + struct txl *p; + char name[20],mail[30]; + p=phone; + int i,j=0,m=0; + FILE *ptr1; + ptr1=fopen("sto3.txt","rb"); + if(ptr1==NULL) + { + printf("通讯录为空\n");//判断是否有储存文件,没有通讯录就返回菜单。 + return; + } + rewind(ptr1); + while(!feof(ptr1)) + { + if(fread(&p[m],LEN,1,ptr1)==1) + m++; + } + fclose(ptr1); + printf("请输入被删除人的姓名和邮箱\n"); + printf("姓名:");scanf("%s",&name);printf("\n"); + printf("邮箱:");scanf("%s",&mail);printf("\n"); + for(i=0;i