我试图将一堆变量输出到制表符分隔的文本文件中,但一旦程序完成,结果文件就完全为空.
string outFileName = "/Users/hbll-diteam/Desktop/" + identifier + ".csv";
ofstream out(outFileName.c_str());
out.open(outFileName);
if(out.is_open())
{
//cout << ";eruigjnsldfijuglsidufblg yay";
out << coCDM_LVL << '\t' << coCDM_LVLname << '\t' << creator << '\t' << contributors << '\t' << coTitle << '\t' << altTitle << '\t' << description << '\t' << dateOriginal << '\t' << dateSpan << '\t' << edition << '\t' << publisher << '\t' << physicalDescription << '\t' << scale << '\t' << extentField << '\t' << medium << '\t' << …Run Code Online (Sandbox Code Playgroud)