I'm developing a project in visual c++ and at some point in code I need to execute some java jar program with some arguments and store it's output into a string So the code I execute in CMD and it works is:
java -jar weka.jar something.arff
And I get some text returned to the command prompt
I want to do the same thing with c++ and store the output into a string variable
I tried using system
function, but as far as I know it's impossible to store output using that one
I also tried using _popen
, ( it did work with commands like dir etc...) but it didn't return any output when using the command provided above
Help would be appreciated