How do you read console output from Windows commands in C ++?

Possible duplicate:
How to run an external program with C and analyze its output?

If you run the Windows command from your program (say ipconfig as an example), how do you read the result that the system returns to your program for processing?

+4
source share
1 answer

See Creating a child process with redirected inputs and outputs on MSDN

Alternatively, you can use _ popen to easily capture output.

+3
source

Source: https://habr.com/ru/post/1345445/


All Articles