Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
c++ 是否会在 ofstream 满时自动刷新它?例如:
std::ofstream OFile; OFile.open("file.txt"); for (int i = 0; i < N; ++i) { OFile << a << " " << b << " " << c << '\n';} OFile.close()
在这里,我没有使用任何操纵器来刷新缓冲区。当流已满时,输出文件是否可能写入不完整?或者当流已满时会自动刷新吗?
谢谢。