作者在 2008-10-07 23:33:37 发布以下内容
// 2008/10/7 VC6.0
#include<stdlib.h>
#include<stdio.h>
typedef int (*pFunc)(float a);
int test(float a)
{
printf("test %f",a);
return 0;
}
int main()
{
pFunc pFunc1 = test; // 函数指针赋值
pFunc1(4.5);
printf("\nhello");
getchar();
return 0;
}
#include<stdlib.h>
#include<stdio.h>
typedef int (*pFunc)(float a);
int test(float a)
{
printf("test %f",a);
return 0;
}
int main()
{
pFunc pFunc1 = test; // 函数指针赋值
pFunc1(4.5);
printf("\nhello");
getchar();
return 0;
}