//从文件中读出数据
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); }
//从文件中读出数据
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); }