if ((fp=fopen("student.bin","wb"))==NULL) if (fwrite(&student[i],sizeof(struct address),1,fp)!=1)

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 09:19:16

if ((fp=fopen("student.bin","wb"))==NULL) if (fwrite(&student[i],sizeof(struct address),1,fp)!=1)
if ((fp=fopen("student.bin","wb"))==NULL)
if (fwrite(&student[i],sizeof(struct address),1,fp)!=1)

if ((fp=fopen("student.bin","wb"))==NULL) if (fwrite(&student[i],sizeof(struct address),1,fp)!=1)
1.如果以只写、二进制的方式打开文件student.bin失败
2.如果向文件指针fp指向的文件写入结构体student[i]失败