#include
int max(int i,int j)
{
return ((i>j)?i:j);
}
typedef int(*fp)(int,int);
int main(void)
{
unsigned int addr = (unsigned int)(&max);
printf("%x\n",addr);
// int (*k)(int,int);
// fp k = (int(*)(int,int))addr;
fp k = (fp)addr;
int m = k(1,2);
printf("%d\n",m);
return 0;
}
#include
int max(int i,int j)
{
return ((i>j)?i:j);
}
//typedef int (*fp)(int,int);
int main(void)
{
unsigned int addr = (unsigned int)(&max);
printf("%x\n",addr);
int (*k)(int,int);
k = (int(*)(int,int))addr;
int m = k(1,2);
printf("%d\n",m);
return 0;
}
阅读(1115) | 评论(0) | 转发(0) |