代码如下 并不会有任何东西写出来
i=0;
counts=0;
FILE *ofile;
errno_t oerr;
oerr = fopen_s(&ofile,"E:\\workspace\\TVPLAY\\data\\test\\test2.txt","w");
if(oerr!=0)
{
cout<<"could not open the file";
exit(EXIT_FAILURE);
}
for (int i = 0; i < sizeof(data); i++)
{
if(fprintf_s(ofile,"%d",(int *)&data[i])<0)
{
break;
}
i++;
counts++;
}