template <class T>class mem_ptr{ typedef int T::mem_fun(int); mem_fun* fn;public: mem_ptr(mem_fun* f) : fn(f) {} int operator()(T* obj, int i) { return obj->(*fn)(i); }};