popen() allows to communicate the process trough a pipe. The problem is that it returns a FILE*
So what could I do to work with fstreams instead?
I guess that the data could be read in binary format (with a header that tells the number of bytes) and then pass that to the constructor of a stringstream (simile with write)