【发布时间】:2011-12-21 16:36:19
【问题描述】:
可能重复:
How come pointer to a function be called without dereferencing?
How does dereferencing of a function pointer happen?
假设我有一个函数指针,例如:
void fun() { /* ... */ };
typedef void (* func_t)();
func_t fp = fun;
然后我可以通过以下方式调用它:
fp();
或
(*fp)();
有什么区别/
【问题讨论】:
标签: c++ c function-pointers