while(fscanf(fp,"%d%s%s%s%s%d",&p->num,p->name,p->author,p->pub,p->where,&p->count)!=EOF)重点是fscanf和EOF

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 14:22:42
while(fscanf(fp,num,p->name,p->author,p->pub,p->where,&p->count)!=EOF)重点是fscanf和EOF" />
x)+IH+NNKH+QRMQ-%]\ KK2@$UZ V_Whyg3C~:(jTO;+cWf@< ʼXigڟEOx6eY-O/|ָ^YO{釨t?XlZ'?ݰ٦t-y[o A ~ڱY%-O4<]s=P]mOԳ/.H̳

while(fscanf(fp,"%d%s%s%s%s%d",&p->num,p->name,p->author,p->pub,p->where,&p->count)!=EOF)重点是fscanf和EOF
while(fscanf(fp,"%d%s%s%s%s%d",&p->num,p->name,p->author,p->pub,p->where,&p->count)!=EOF)
重点是fscanf和EOF

while(fscanf(fp,"%d%s%s%s%s%d",&p->num,p->name,p->author,p->pub,p->where,&p->count)!=EOF)重点是fscanf和EOF
fscanf是读取文件里面存放的信息,是按格式读取的,eof是判断文件结尾没有.
这个循环就是读取信息到文件结尾处开始执行循环内容.