#include <iostream>
#include <string>
#include <pthread.h>
#include <functional>
using namespace std;
typedef void (*MyFun)(int n, string str);
static void Test(int n, string str){
cout << "n = "<< n << " str = " << str <<endl;
}
typedef std::function <void(int n, string str)> m1;
int main(){
MyFun m1;
//callback 1
m1 = Test;
m1(111,"1233" );
//callback 2
auto func3 = std::bind(Test, std::placeholders::_1, std::placeholders::_2);
func3(2222, "Hello");
//callback 3
m1 = Test;
cc(44444,"mmmmmm");
return 0;
}