《effective C++》p171-p174
#include <iostream>
#include <functional>
using namespace std;
//function对象( 也可直接写作typedef function<void (int)> my_func; )
typedef tr1::function<void (int)> my_func;
//函数指针
typedef void (*my_func_2)(int);
void func(int i){
cout << i << endl;
}
int main(){
my_func foo = func;
foo(1);
my_func_2 bar = func;
bar(2);
int ttt = 0;
return 0;
}