函数模版和类模版简单例子 Magic | 2023-11-06 8:00 | 2023-11-06 7:21 | 数据结构 | 1 | 256 47 字 | 3 分钟 #include <iostream> using namespace std; // 函数模版 template <typename T> void Swap(T& a, T& b) { T t = a; a = b; b = t; } // 类模版 template <typename T> class Op { pu… 数据结构