标签:style 使用 sp amp on new c as bs
函数指针的赋值与使用均有两种方式:
int max(int a, int b)
{
return a>b ? a: b;
}
int (*pfun)(int x, int y);
赋值:
Pfun=max
Pfun=&max
两个都可以
使用:
Pfun(a,b)
(* pfun)(a,b)
函数指针
原文地址:http://www.cnblogs.com/notlate/p/3947134.html