作者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