










Two ways to make use of it:
1) directly declare a function pointer variable at the place where it's required. like below:
void (*pFunc)(int); // pFunc is a variable here
pFunc = &FuncA;
pFunc(2);
2) typedef a function poiner type and then use it. like below:
typedef void (*pFunc)(int);
pFunc pFuncObj = &FuncA;
pFuncObj(2);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。