call command line application and read output

Hello,

I would like to launch a CLI application and read what it outputs.
I can launch the app using system() but don’t know how to read it’s output.

How do you read the output of an CLI application launched from an oF app ?

You will have to use the standart C++ way, there is not such OF functionality.

Look here: http://stackoverflow.com/questions/478898/how-to-execute-a-command-and-get-output-of-command-within-c and here: https://gist.github.com/robotconscience/2554110

there’s actually an OF function to do that: ofSystem(“command”)

Thank you both for the input.

I’ve tested both methods, and both returned the same results.

The issue I have now is that I only get the first few lines of the output, not the full output.
Any hints on how to deal with that ?

Thank you,
George