Hi, I am using *open_memstream* in a library of mine, but I would like to port this library to MSVC. It seems there are no equivalent function available, but is there something similar enough?
What *open_memstream* does is it takes a char** destination and size and returns a FILE* which you many write to, the data is stored in a dynamically allocated buffer (accessible from the char** argument). When closing the FILE the char** contains the data that was written to the stream. This makes an easy way to construct large and complex string streams.
While it is possible to both read and seek from the memstream I only write to it.
Is there a way to open a similar memory FILE stream in MSVC? Also, this is pure C, no C++.