Chinaunix

标题: std::ofstream在未关闭的情况下如何保存文件 [打印本页]

作者: colin8080    时间: 2015-07-08 15:32
标题: std::ofstream在未关闭的情况下如何保存文件
std:fstream     m_ofsFile;

m_ofsFile.open(m_strFilePath.c_str(), std:fstream:ut|std:fstream::app);

m_ofsFile << "Hello world!";

m_ofsFile.flush();

之后怎么还是看不到写入文件的内容呢?




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2