//函数模板 template < classT > voidswap(T& x, T& y){ T temp = x; x = y; y = temp; }
// class T, parameterized type name 参数化的类型名 // inside swap, using T as if it's a type name // intmain(){ std::cout << "hello jack"<< std::endl; return0; }
//函数模板 template < classT > voidswap(T& x, T& y){ T temp = x; x = y; y = temp; }
// class T, parameterized type name 参数化的类型名 // inside swap, using T as if it's a type name // intmain(){ std::cout << "hello jack"<< std::endl; return0; }