开发者

How do you read the console output from windows commands in C++? [duplicate]

开发者 https://www.devze.com 2023-02-20 15:50 出处:网络
This question already has answers here: 开发者_运维问答Closed 11 years ago. Possible Duplicate: How can I run an external program from C and parse its output?
This question already has answers here: 开发者_运维问答 Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消