回复 2楼 kwxx
truct data
{ int no;
char name[MAX];
int a[MAX];
};
int main()
{
int i,n=5;
data *s;
FILE *fp=fopen("F:\\f1.txt","r");
if(!feof(fp))
{
printf("can't open file\n");
return -1;
}
for(i=0;i<n;i++)
{
fscanf(fp,"%s",&s[i]);
printf("%s",s[i]);
}
printf("\n");
fclose(fp);
return 0;
打不开文件,什么问题????