diff --git a/通讯录.c b/通讯录.c index b15eba2..14fa9ac 100644 --- a/通讯录.c +++ b/通讯录.c @@ -92,7 +92,38 @@ void search() //ä¯ÀÀ void look() { - + char c; + if((fp=fopen("user.txt","r"))==NULL) //´ò¿ªÎļþuser.txt + { + printf("¶ÁÈ¡ÐÅϢʧ°Ü£¡\n"); + exit(0); + } + int m=0; + while(!feof(fp)) + { + if(fread(&user[m],sizeof(struct user),1,fp)==1) + m++; + } + int i; + printf("ÐÕÃû\t\t¼®¹á\t\tµç»°1\t\tµç»°2\t\tÓÊÏä\n"); + for(i=0;i