I\'m basically looking for a C++ version of fdopen(). I did a bit of research on this and it is one of those things that seems like it should be easy, but turns out to be v
There's a good chance your compiler offers a FILE-based fstream constructor, even though it's non-standard. For example:
FILE* f = fdopen(my_fd, "a"); std::fstream fstr(f); fstr << "Greetings\n";
But as far as I know, there's no portable way to do this.