How do you read the console output from windows commands in C++? [duplicate]
Possible Duplicate:
How can I run an external program from C and parse its output?
If you run a Windows command from inside your program (let's say ipconfig as an example), how do you read the output the system gives you back into your program for processing?
See Creating a Child Process with Redirected Input and Output on MSDN
Alternatively, you can use _popen for simple capture of output.
精彩评论