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++
相關文章
相關標籤/搜索