摘要: 1、类静态成员函数作为回调函数 1)类定义 CommonFunctions.h class CommonFunctions { public: CommonFunctions(); static int add_test(int a, int b); }; CommonFunctions.cpp # 阅读全文
posted @ 2023-11-23 16:19 左边的翼 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1、定义 1)声明函数指针类型 typedef int(*CallBackFunction)(int a, int b); 2)定义函数指针对象 CallBackFunction CallBackFunction_PTR; 3)初始化函数指针对象 void set_call_back(CallBac 阅读全文
posted @ 2023-11-23 15:09 左边的翼 阅读(9) 评论(0) 推荐(0) 编辑