pointer function

TYPEDEF 

typedef int *(JobCompleteCallBack) (char a);

int funct(char a)

{

    printf("%d  Jobcompleted",a);

    return 0;

}

void Doit(char job, JobCompleteCallBack Jcc)

 {

    //do the job

    Jcc(job);    //callback

}

void main()

{

    Doit(0,funct);

}

 

指针函数的作用

1.multithreading

2.dynamic link library function call

3.hooking

4.virtulization

5.plug-in model programming

6.c++ virtual function

7.event driven programming

2.

posted @ 2018-09-26 15:13  zhouxyha  阅读(94)  评论(0编辑  收藏  举报