方式如下:system(“命令”) 要加入头文件#include<stdlib.h> e.g. system("ls"); 转载于:https://www.cnblogs.com/denflyson/archive/2012/06/12/2546776.html