这样声明函数总是出错,请各位看看如何修改,谢谢!
紫色动力 2012-08-14 09:55:33 code=C/C++]template<typename T>
list<T>::iterator seqSearch(list<T>::iterator first, list<T>::iterator last,
const T &target);[[/code]
警告信息如下:
1>d:\practise\c++\zpp\zpp\main.cpp(14): warning C4346: 'std::list<T>::iterator' : dependent name is not a type
1> prefix with 'typename' to indicate a type