title: Rewrite code: Output from file to char* ~> is FILE* to virtual file in RAM possible?
body: <p>I have some old 3rd party <code>C++</code> code that writes to/reads from a file using <code>fopen()</code>, <code>fprintf()/fscanf()</code>. I need to rewrite it, so that the whole thing that is serialised is returned as a <code>char*</code>.</p>
  
  <p>Is it possible to just "open" a virtual file (with unknown size) in memory and then copy the output to a <code>char*</code>, so that I don't have to touch the <code>fprintf()</code>-with-<code>filedescriptor</code> part at all?</p>