0_0_35511415_24176.cpp: In function 'int main()':
0_0_35511415_24176.cpp:3:5: error: 'pid_t' was not declared in this scope
pid_t fpid; //fpid表示fork函数返回的值
^
0_0_35511415_24176.cpp:5:5: error: 'fpid' was not declared in this scope
fpid=fork();
^
0_0_35511415_24176.cpp:5:15: error: 'fork' was not declared in this scope
fpid=fork();
^
0_0_35511415_24176.cpp:9:71: error: 'getpid' was not declared in this scope
printf("i am the child process, my process id is %d/n",getpid());
^
0_0_35511415_24176.cpp:14:72: error: 'getpid' was not declared in this scope
printf("i am the parent process, my process id is %d/n",getpid());
^
|