摘要: 很多时候我们需要 上层代码需要执行 shell 命令,但还要有返回值,例如需要获取 ls 的返回值 接下来介绍几种编程语言的获取命令的返回值的方法 第一种 C++ 代码如下: #include <iostream> #include <string> #include <stdio.h> int e 阅读全文