模板函数 template<class T> void cout1(T i) { cout<<i<<endl; } 定义模板函数的指针: void (*ptr_fun_cout1)(int) = cout1;