linux下的system函数问题!!!!!
有个可执行程序hello
命令行里面输入./hello就能执行了
但是我想在程序里面调用,想要用system函数,咋办〉
hello在 /season/中文 这个目录里面
怎么搞?
[解决办法]
linux用system函数,我想问c库有这个函数吗?
[解决办法]
楼主还有强烈的windows习惯,linux下好像没有这个函数.
[解决办法]
system("/season/中文/hello");
[解决办法]
有这个函数,在stdlib.h文件中,用法如楼上所说。
[解决办法]
我试了能执行
[解决办法]
linux用system函数,我想问c库有这个函数吗?
有的!这是标准库里面的函数!在stdlib中
[解决办法]
system("/season/中文/hello");
这样不能执行把。。。
可以的把!
#include <stdlib.h>
int system(const char *command);
system 需要的参数就是一个可执行的命令啊
[解决办法]
system("/bin/ls");