FILE *outf;
outf=fopen("\\data\\temp.dat","w");
for(int i=0;i<=143;i++)
{
fprintf(outf,"%f \n",temp[i]);//----------到这步出错
}
k=0;
fclose(outf);
错误:
access violation at address 32566694 in module cc3250mt.dll
read of address f8b672a4
temp[]在什么地方申明的,看看是不是下标越界了。
比如定义float temp[140];
而你要访问temp[140],temp[141]...等就会出错,当然编译是不会出错的。
有道理。
temp是不是null?
数组越界访问?
不妨跟踪一下,看i为何值出错?
文件打开成功了没有?