标签: c++ windows
可能重复: How can I run an external program from C and parse its output?
如果从程序内部运行Windows命令(比如以ipconfig为例),您如何阅读系统返回程序进行处理的输出?
答案 0 :(得分:3)
请参阅MSDN上的Creating a Child Process with Redirected Input and Output
或者,您可以使用_popen来简单捕获输出。