请问c语言下,用fopen打开的文件怎么求文件的长度 if((fp=fopen("1.PMS","rb+"))==NULL) { printf("cannot open file\n"); return; }
int group=0,index=0; for(int i=0;i<700;i++) { long ii = group * 1580 + index * 60 + 3010; fseek(fp,ii,0); fread(&words[i],sizeof(struct wordlib),1,fp); words[i].word[19] = '\0'; words[i].phon[19] = '\0'; words[i].chin[19] = '\0'; index++; while(index==25) { index=0; group++; } printf("%s %s %s\n",words[i].word,words[i].phon,words[i].chin); wordstore[N1]=words[i].word; phonstore[N1]=words[i].phon; chinstore[N1]=words[i].chin; N1++; } fclose(fp); 怎么求这个1。PMS的字节长度 我想判断文件的长度才能准确控制循环,请大吓们帮帮忙,谢谢!