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

大神帮忙见见 ((void (*)(void))VIC0ADDRESS)()

2012-08-09 
大神帮忙看看 ((void (*)(void))VIC0ADDRESS)()((void (*)(void))VIC0ADDRESS)();其中((void (*)(void))该

大神帮忙看看 ((void (*)(void))VIC0ADDRESS)()
((void (*)(void))VIC0ADDRESS)();
其中((void (*)(void))该怎么理解?

[解决办法]
http://topic.csdn.net/u/20120618/06/68dd85e6-0be7-4d83-a303-883793634c11.html?2763
[解决办法]
跟函数指针没啥区别,通常会这样用:

C/C++ code
#include <stdio.h>void sayhello(void){        printf("hello godson!\n");}int main(void){        /* normally, we use a function pointer such like this. */        void (*p)(void);        unsigned int addr;        /* but we can use the address of a function directly. */        addr = sayhello;        printf("%d\n", addr);        ((void (*)(void))addr)();        /* use function pointer */        p = sayhello;        p();        return 0;} 

热点排行