运行不提示错误,为何读取不到文件内容,fread 函数,求指导
int Fetch(){
int i,a=0;
FILE *fp;
if((fp=fopen("jilu.txt","rb"))==NULL)
{
printf("无法打开文件!");
return -1;
}
while(!feof(fp))
{
if(fread(&Message[a],sizeof(struct records),1,fp)==1)
a++;
}
fclose(fp);
2020-03-16 20:45
2020-03-16 20:49
2020-03-16 20:50
2020-03-16 20:54
2020-03-16 20:59
2020-03-16 21:00
2020-03-16 21:48