w.c:97:46: warning: passing argument 3 of 鈥榳aitpid鈥� makes integer from pointer without a cast [-Wint-conversion] waitpid(cpid[processNumber-1],NULL,NULL);//??? In file included from w.c:8:0: /usr/include/arm-linux-gnueabihf/sys/wait.h:86:16: note: expected 鈥榠nt鈥� but argument is of type 鈥榲oid *鈥橽n extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
第三个论点必须是 INT , 空值 不是 INT 但一个指针( ((void*) 0) 正如你在警告中看到的那样,将其替换为0,所以 waitpid(cpid[processNumber-1], NULL, 0);
((void*) 0)
waitpid(cpid[processNumber-1], NULL, 0);