博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Review: Function Pointer
阅读量:7080 次
发布时间:2019-06-28

本文共 394 字,大约阅读时间需要 1 分钟。

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);

转载于:https://www.cnblogs.com/taoxu0903/archive/2011/07/01/2095564.html

你可能感兴趣的文章
win7究竟比windowsXP或windows2003优秀多少呢?
查看>>
转 jQuery插件Highcharts、flexigrid实践
查看>>
Burning
查看>>
Oracle 支持在具有 DHCP 分配的 IP 地址的系统上进行
查看>>
Tools
查看>>
名词解释CPC、CPM、CPA.......【转载】
查看>>
hive并发调用的运行方式-个人经验篇 - ggjucheng - 博客园
查看>>
Sharepoint 2010 学习资源总结
查看>>
const_iterator思考
查看>>
细节是否真的打败爱情,十年后你还会爱我吗?
查看>>
Windows Phone 8 SDK RC 版推出
查看>>
Database2Sharp代码生成工具使用心得
查看>>
稀疏矩阵的十字链表存储
查看>>
【算法导论第13章】红黑树
查看>>
对PostgreSQL中bufmgr.c 中 bufs_to_lap的初步理解
查看>>
Windows 内存分析之路 --How to use Resource Monitor
查看>>
文件上传
查看>>
理解maven的核心概念
查看>>
一个简单的名片管理程序(C#)
查看>>
max tablename length limit in MySQL is 64
查看>>