33,311
社区成员
发帖
与我相关
我的任务
分享
MSDN:
"w"
Opens an empty file for writing. If the given file exists, its contents are destroyed.
channelData2.close();
这句前面加句
channelData2.flush();
在这
ofstream stream("save.dat",ios_base::app | ios_base::out );
stream << strLine.c_str() << "\n";
后面加上 stream.flush();
stream.close();
在看看结果。