//从文件中读出数据
void ReadFromFile(int a[]){ int i=0; FILE *fp; if((fp=fopen("data.txt","r"))==NULL){ printf("file read error!"); exit(1); } while(!feof(fp)){ (fp,"%d",&a[i++]); } fclose(fp);}
本文共 279 字,大约阅读时间需要 1 分钟。
//从文件中读出数据
void ReadFromFile(int a[]){ int i=0; FILE *fp; if((fp=fopen("data.txt","r"))==NULL){ printf("file read error!"); exit(1); } while(!feof(fp)){ (fp,"%d",&a[i++]); } fclose(fp);}
转载于:https://www.cnblogs.com/jamsbwo/p/4100265.html