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.
我想打开一个文件进行读写std::filebuf,但如果该文件尚不存在,则创建该文件。如果它已经存在,什么也不做。我想自由地写入文件,没有任何“每次写入前总是跳到结尾”的行为。应该使用什么开放模式?
std::filebuf
根据表格,似乎没有标志组合可以做到这一点。
确保这种效果的最佳选择是什么?