可以通过system函数,调用shell命令。1 函数原型:int system(const char *cmd);2 功能:调用cmd内容的系统命令,即shell命令。3 头文件:stdlib.h4 举例:system("ls");打印当前工作目录下的文件。
用exec族函数或者system函数