From d05df3a21cff0191b73850e5556348b1d5f624e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=9B=A8?= <389919422@qq.com> Date: Thu, 10 Jan 2019 21:19:17 +0800 Subject: [PATCH] first commit --- hhh3.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 hhh3.c 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