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.
我必须为自定义条目编写一个小记录器。我使用 boost 类“boost::filesystem::fstream”进行读写。首先我打开一个日志文件 _file.open( boost::filesystem::path( _fileName ), std::ios_base::out | std::ios_base::binary ); 并从那里阅读所有条目。然后我写了一个新条目,我得到一个“badbit”-异常。我做错了什么?