求解,关于array【】数组写入文件的操作
for(i=0;i<=100;i++){
fprintf(fp,"%s\n",array[i].name);
fprintf(fp,"%s\n",array[i].region);
fprintf(fp,"%s\n",array[i].type);
fprintf(fp,"%lf\n",array[i].price);
fprintf(fp,"%lf\n",array[i].area);
fprintf(fp,"%d\n",array[i].rentOrSell);
}
printf("文件保存成功!\n");//
getchar();
fclose(fp);
}
C:\Users\Gth\Desktop\main.c(205) : error C2224: left of '.price' must have struct/union type
报这个错误怎么改啊?