1. 程式人生 > >回撥函式的用法

回撥函式的用法

#include <stdio.h>

void Test_Demo( void ( *FUNC )( int a,int b),int x,int y )
{
//int a = 1;
//int b = 5;

FUNC(x,y);
}

void func(int x,int y)
{
printf("%d\n",x+y);

}

int main(void)
{
Test_Demo(func,1,23);


return 0;
}