我用execv而不是execl.要使用execv,我创建一个数组并将我使用的参数execl放在那里.然后我把这个数组放入execv
我知道我必须使用一系列参数,execv但为什么呢?execl和之间有什么区别execv?
我的c代码有问题,当我尝试printf相同的值时,g ++编译器给出了一个关于long unsigned int的错误.这是我的代码和我得到的错误:
as3.c: warning: format %s expects type char *, but argument 2 has type onion
as3.c: warning: format %d expects type int, but argument 3 has type long unsigned int
as3.c: warning: format %d expects type int, but argument 3 has type long unsigned int
as3.c: warning: format %d expects type int, but argument 5 has type long unsigned int
as3.c: warning: format %d expects type int, but argument 2 has type long unsigned int
Run Code Online (Sandbox Code Playgroud)
#define NUM1 …Run Code Online (Sandbox Code Playgroud)