I have some (C-)code that wants a FILE*.
In this file (pointer) the output I want is written.
I don't want to create files (if I don't have to). I am merely interested in the output produced.
Is it possible to somehow create a FILE* that prints (directly) into some buffer?
(A C equivalent of std:stringstream, so to speak.)
Obviously I can create a temporary file, pass that to the function, read the contents of the file and the delete it... (which is what I am doing right now). I was just wondering if there was a more elegant (and succinct, faster due to no file IO etc.) way to achieve that.
Thanks
Christoph
Bookmarks