黑馬程序員2017C++STL教程(1到4)

一. 函數模板基本語法 #include <iostream> using namespace std; template<class T> void MySwap(T& a, T& b) { T temp = a; a = b; b = temp; } //注意對於一個template而言,只能將其用於,緊貼它的那一個函數,二對於後面的,都是無效的。必須緊貼再定義其
相關文章
相關標籤/搜索