作者ray0527 (ray)
看板EE_DSnP
標題[問題] hw1.2.p2c
時間Wed Mar 18 14:55:38 2009
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
1F:→ ilway25:有個地方要指明 <string>,找找看吧 03/18 14:58
2F:→ ray0527:是指selectionSort<string> ()嗎??可是加了還是一樣... 03/18 15:22
3F:推 lovelylion2:Less<string>() <- 你要指明哪一種樣本的Less 03/18 15:39