if(fread(&s[i],sizeof(struct stu),1,fp)==1)
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/07/06 13:43:59
if(fread(&s[i],sizeof(struct stu),1,fp)==1)
if(fread(&s[i],sizeof(struct stu),1,fp)==1);
else
{
printf("读取文件出错");
fclose(fp);
exit(0);
}
fclose(fp);
return;
调试时出现读取文件错误时为什么
if(fread(&s[i],sizeof(struct stu),1,fp)==1);
else
{
printf("读取文件出错");
fclose(fp);
exit(0);
}
fclose(fp);
return;
调试时出现读取文件错误时为什么
![if(fread(&s[i],sizeof(struct stu),1,fp)==1)](/uploads/image/z/16504606-46-6.jpg?t=if%28fread%28%26s%5Bi%5D%2Csizeof%28struct+stu%29%2C1%2Cfp%29%3D%3D1%29)
从文件指针fp读取一个size为sizeof(struct stu)的数据,存入s[i],if用来判断读取是否成功
for(i=0;fread(&pil[i],sizeof(struct pilot),1,fp)!=0;i++)
if((fp=fopen("d=\\jrzh\\example\\stu-list","wb+"))==NULL)中的N
(1/2)已知有如下声明,则sizeof(test)的值是_____?struct {int i; char c; fl
#include#include#include#define LEN sizeof(struct LinkList)s
刚学的C语言struct stint i;int j;int *q;main(){struct m[]={{10,1},
struct S { int i; int * p;}; main () {S s ; int *p =&s.i ; p
if ((fp==fopen(filename,"w"))==NULL) 改为 if ((fp=fopen(filena
scanf("%s",stu[i].
struct{int i;char c;float a}test;则sizeof(test)的值是
aa=12;x=12; fread(&ff,2,1,in);bb=ffx;ff=cc|bb;
1. 有如下定义: struct {int x; int y; } s[2]={{1,2},{3,4}},*p=s; 写
C语言中,if(strcmp(stu[i].code,s1)==0)是什么意思?