C调用Shell命令

#include <stdlib.h>

int main(int argc, char const *argv[])
{
    system("ls -l");
    return 0;
}

与命令行输入ls -l的效果一致

猜你喜欢

转载自blog.csdn.net/qq_33242956/article/details/89202923