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

函数指针调用了但没有执行

2012-10-11 
函数指针调用了但没执行。C/C++ codetypedef struct//消息映射定义{unsigned char (*Func)(void)}_FUNCun

函数指针调用了但没执行。

C/C++ code
typedef struct                                                //消息映射定义{    unsigned char (*Func)(void);}_FUNC;unsigned char function(){    printf("\n执行了function()函数\n");    return 1;}_FUNC const Func[]={       function,    };void main(){    int i =0;         (*(Func[i].Func));


[解决办法]
(*(Func[i].Func));

"()" 才是函数调用操作符. 

(*(Func[i].Func))();

热点排行