无法在流附加模式下打开文件

时间:2018-03-08 08:06:02

标签: c++ ofstream

我尝试使用ofstream.open()功能打开文件,但没有任何效果。

这是我的代码:

string track_file_str = "tmp-f/frame" + to_string(frame_number) + ".txt";   
outfile_counter.open(track_file_str.c_str(), ofstream::out | ofstream::app);
outfile_counter << "?" << endl;
for (i=0; i<NROI; i++)
    outfile_counter << ...... *some variables*

编译器没有错误,但在文件中我尝试附加我的数据并没有出现。

0 个答案:

没有答案
相关问题