摘要:
C语言中可以用函数地址直接调用函数:实例代码:void print (){ printf ("function print");}typdef void (*fun)();fun f = print;f();C++中类非静态成员函数必须通过实例去调用,C++中类成员函数调用:class test{public:void print (){ printf ("function print");}};我们同样可以通过定义函数指针来调用如下:typedef void (test::*fun)();fun f = &test::print;test t; 阅读全文
posted @ 2013-06-08 21:02
蒲蜡
阅读(4360)
评论(0)
推荐(1)

浙公网安备 33010602011771号