I am currently trying to call an extrenal program from within my C++ code and then to collect the output and store it.
Currently I think that I want to store the information in a strstream. Is there a way to redirect stdout to the strstream so that I can call system("XXX") and then have the output of XXX accessible through the strstream?
Or, is there a viable alternative? The system call will return text data of variable length, hence part of the appeal of strstream. I was planning on analyzing each line of the strteam using getline().