C++ 函数模板与类模板

1-1 为何要一用函数模板呢。 #include <iostream> using namespace std; /* void myswap(int &a, int &b) { int t = a; a = b; b = t; } void myswap(char &a, char &b) { char t = a; a = b; b = t; } */ //template 关键字告诉C++
相关文章
相关标签/搜索