标签:os 文件 数据 ad amp c file c语言 ca
//从文件中读出数据
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))
{
fscanf(fp,"%d",&a[i++]);
}
fclose(fp);
}
标签:os 文件 数据 ad amp c file c语言 ca
原文地址:http://www.cnblogs.com/jamsbwo/p/4100265.html