开始学习和使用boost的function了 /* 03.08.2009 ccsdu2004@yahoo.com.cn www.gaimo.net */ #include <cstdlib> #include <iostream> #include <boost/function.hpp> using namespace std; using namespace boost; inline bool fun(int a, int b) {return a >b;} int main(int argc, char *argv[]) { function<bool(int,int)> f; f = &fun; cout<<f(2,3)<<endl; system("PAUSE"); return EXIT_SUCCESS; }