void close();
rdbuf()->close()
1234567891011121314
// ofstream::open / ofstream::close #include <fstream> // std::ofstream int main () { std::ofstream ofs; ofs.open ("test.txt", std::ofstream::out | std::ofstream::app); ofs << " more lorem ipsum"; ofs.close(); return 0; }