How to write to a memory buffer with a FILE*?

There is a POSIX way to use memory as a FILE descriptor: fmemopen or open_memstream, depending on the semantics you want: Difference between fmemopen and open_memstream

Leave a Comment