diff --git a/main.cpp b/main.cpp index fe5614e..9462d68 100644 --- a/main.cpp +++ b/main.cpp @@ -17,7 +17,7 @@ typedef struct lm linkman,lkm; -int flag2,p,flag3; +int flag2,p,flag3,flag4; char e_num; void add(); @@ -353,10 +353,18 @@ void view() if(x==1) { + flag4=0; while(!feof(ptr1)) { fscanf(ptr1, "%s%s%d%s",linkman.name,linkman.phonenum,&linkman.kind,linkman.email); - + if(ftell(ptr1)-2<=flag4) + { + break; + } + else + { + flag4=ftell(ptr1); + } //printf("%d %-10s %-10s %d %-10s",i,linkman.name,linkman.phonenum,linkman.kind,linkman.email); if(linkman.kind==1) printf("%2d %-10s %-20s 办公类 %-10s\n",++i,linkman.name,linkman.phonenum,linkman.email); @@ -519,7 +527,7 @@ void amend() j=0; rewind(ptr1); - + while(!feof(ptr1)) { diff --git a/main.exe b/main.exe index 6ac8659..b453df2 100644 Binary files a/main.exe and b/main.exe differ diff --git a/storage.sto b/storage.sto index 1dcf451..e1ed249 100644 --- a/storage.sto +++ b/storage.sto @@ -5,6 +5,7 @@ 月亮酋长 91111111 2 moon@nasa.us 火箭舰长 0906342 1 3213@898.cn 梧桐 100322 3 987@qq.com - 大山 10099 1 gongxifacai@qq.com 美滋滋 666888 2 万事如意@腾讯.com - 爽歪歪 666666 2 恭喜发财@腾讯.com \ No newline at end of file + 爽歪歪 666666 2 恭喜发财@腾讯.com + 嘉禾望岗 100006666 3 10384920@mail.com + 侨城东 0755123123 1 development@sz.gov.cn