一小段数据结构代码的含义
int count() /*计算文件中的记录总数*/{ FILE*fp;int num;struct user temp;num=0;if((fp=fopen(file,"rb"))==NULL) { printf("cannot open file!\n");exit(1)... 展开
int count() /*计算文件中的记录总数*/{ FILE*fp;int num;struct user temp;num=0;if((fp=fopen(file,"rb"))==NULL) { printf("cannot open file!\n");exit(1);} while(fread(&temp,sizeof(struct user),1,fp)) /*循环读取数据*/ { num++;} fclose(fp);return num;}这段代码的含义 ,实现的功能是什么?~~!??? 收起
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。