以下是引用牛虻在2005-5-10 12:38:43的发言:
可以利用文件来保存数据
例如:FILE *fp; char filename[10];
printf("Input filename:\n");
scanf("%s",filename);
if(fp=fopen(filename,"w"))==NULL)
{printf("Cannot open!");exit(0);}
for(i=0;i<n;i++)
if(fwrite(&a[i],sizeof(struct cxpf),1,fp)!=1)
printf("file write error\n");
fclose(fp);
Every thing is possible.