追加写文件
std::ofstream FileName;
FileName.open("E:\xx.txt", ofstream::app);for (int i=0;i<num;i++)
{
FileName<<data[i]<<std::endl;
}
正常读写文件
#pragma warning(push)
#pragma warning(disable:4996)
FILE *fp;
fp=fopen(strpath,"rb");
fread(Image,sizeof(short),ImageSize[0]*ImageSize[1],fp);
fclose(fp);
#pragma warning(pop)
#pragma warning(push)
#pragma warning(disable:4996)
FILE *fp;
fp=fopen(strpath,"wb");
fwrite(Image,sizeof(short),ImageSize[0]*ImageSize[1],fp);
fclose(fp);
#pragma warning(pop)