回调函数c++

#include <stdio.h>

typedef void (* FP)(unsigned int a,unsigned int b);
//void DataDeal(FP PCB);
//void PointerReceive(unsigned int a,unsigned int b);
//void Pointer(unsigned int a,unsigned int b);
////////////////////////////////////////////////////////////////

void Pointer(unsigned int a,unsigned int b)
{

a = (a>b)?a : b;
printf("THE BIG ONE IS = %d",a);
}
void PointerReceive(unsigned int a,unsigned int b)
{
Pointer(a,b);
}
void DataDeal(FP PCB)
{
unsigned int m,n;
m = 5;
n = 8;
PCB(m,n);
}
void main(void)
{
DataDeal(PointerReceive);
getchar();
}
原文地址:https://www.cnblogs.com/tiandsp/p/2322674.html