首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

codeblocks如何无法实现函数,变量的跳转

2014-01-01 
codeblocks怎么无法实现函数,变量的跳转?[codec][#include stdio.h#include unistd.h#include sys/w

codeblocks怎么无法实现函数,变量的跳转?
[code=c][#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
main(){

    int pid,status,exit_status;
    if ((pid=fork()) <0)
    {
        perror("fork failed");
        exit(1);
    }
    if (!pid){
        /* 子进程 */
        sleep(4);
    exit(5); /* 使用非零值退出,以便主进程观察 */

}
/* 父进程 */
if (wait(&status) <0)
{
    perror("wait failed");
    exit(1);
}
/* 将 status 与 0xFF(255)与来测试低 8 位 */
if (status & 0xFF)
    printf("Somne low-roderbits not zero\n");
else
{
    exit_status=status >> 8;
    exit_status &=0xFF;
    printf("Exit status from %d was %d\n", pid,exit_status);
//就在这个地方我点住右键pid然后选择find decleration of pid
//弹出的错误就是warning :not found pid

}
exit(0);
}
/code]



[解决办法]
貌似不规范的代码不处理...
int main()

热点排行