看板 EE_DSnP 關於我們 聯絡資訊
template <class T> void selectionSort(vector<T>& array, const Compare<T>& compare) { ... } int main() { vector<string> userInput_1(i); ... selectionSort( userInput_1, Less() ); ... } compile 時就出現error: missing template arguments before 「(」 token 請問這是哪裡出問題了呢....? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.224.46.41
ilway25:有個地方要指明 <string>,找找看吧 03/18 14:58
ray0527:是指selectionSort<string> ()嗎??可是加了還是一樣... 03/18 15:22
lovelylion2:Less<string>() <- 你要指明哪一種樣本的Less 03/18 15:39