diff --git a/lh b/lh new file mode 160000 index 0000000..3c13168 --- /dev/null +++ b/lh @@ -0,0 +1 @@ +Subproject commit 3c1316815194c8e61149c1b2d2dcc4434d4567b2 diff --git a/main.cpp b/main.cpp index 03d2c44..0f7f5fc 100644 --- a/main.cpp +++ b/main.cpp @@ -475,22 +475,59 @@ void amend() } if(flag==2)goto pos_3; //写入待修改的联系人信息 + char ch; fflush(stdin); + printf("更改 %s 姓名(y/n)",array[x-1].name); + ch=getchar(); + fflush(stdin); + if(ch=='y'||ch=='Y') + { printf("姓名:"); + fflush(stdin); gets(array[x-1].name); + } + printf("更改 %s 的电话号码 %s (y/n)",array[x-1].name,array[x-1].phonenum); + fflush(stdin); + ch=getchar(); + if(ch=='y'||ch=='Y') + { printf("电话号码:"); + fflush(stdin); gets(array[x-1].phonenum); + + } + fflush(stdin); + printf("更改现在分类 "); + switch(array[x-1].kind) + { + case 1:printf("办公类");break; + case 2:printf("个人类");break; + case 3:printf("商务类");break; + } + printf(" (y/n)"); + fflush(stdin); + ch=getchar(); + if(ch=='y'||ch=='Y') + { printf("分类(1 办公类 2 个人类 3 商务类):"); - scanf("%d",&array[x-1].kind); + scanf("%d",&array[x-1].kind); + while(lkm.kind<0||lkm.kind>3) { printf("请输入1-3内的数字:"); scanf("%d",&array[x-1].kind); } + + } + printf("更改 %s 的电子邮箱 %s (y/n)",array[x-1].name,array[x-1].email); + fflush(stdin); + ch=getchar(); + if(ch=='y'||ch=='Y') + { printf("电子邮箱:"); fflush(stdin); gets(array[x-1].email); - + } pos_3: i=0; fclose(ptr1); diff --git a/main.exe b/main.exe index 47d0eab..4ddf729 100644 Binary files a/main.exe and b/main.exe differ diff --git a/storage.sto b/storage.sto index be3e37b..1718b40 100644 --- a/storage.sto +++ b/storage.sto @@ -1 +1 @@ - 美滋滋 133900 2 haibucuo@stu.hut.edu.cn 34 4325 1 rqewgv@qq.com \ No newline at end of file + 美滋滋 133900 2 haibucuo@stu.hut.edu.cn 小白兔 10010 1 18408000666@stu.hut.edu.cn \ No newline at end of file