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::fstream からの FILE* の取得
iostream 派生クラスから FILE* を取得する方法はありますか? 特にfstreamから?
いいえ、少なくともポータブルな方法ではありません。
GCCには、ストリームで使用できるlibstdc++と呼ばれるクラスがあり、関連付けられている を直接取得できますが、は ではなく、では使用できません。stdio_filebufFILE*stdio_filebufbasic_filebufbasic_fstream
libstdc++
stdio_filebuf
FILE*
basic_filebuf
basic_fstream