c 语言编程问题

来源:互联网 发布:ed2k网络连接不上 编辑:程序博客网 时间:2024/06/15 06:18

c 语言编程问题 为什么我用fread时信息度不到内存?帮忙看看啊?

void del_xianlu()//删除汽车路线信息 { if((fp1=fopen("car.dat","rb"))==NULL) printf("cannot open this file!/n"); struct route *p; p=head_xl=(struct route *)malloc(sizeof(struct route)); while(1) { if(fread(p, sizeof(struct route), 1, fp1) !=1)break; p=p->next; } p->next=NULL; fclose(fp1);}fread 不能把信息读到内存
原创粉丝点击