///函数指针的小实验
///2012-9-11
///知道函数地址,如何调用
#include<stdio.h>
typedef int(*pFun)(void);
int print(void)
{
printf("Hello,world!\n");
}
int main()
{
int funAddress;
pFun pFunTemp;
funAddress = print;
((pFun)funAddress)();
pFunTemp = funAddress;
(*pFunTemp)();
return 0;
}
函数指针
最新推荐文章于 2024-07-08 08:03:58 发布