Hi all, I have a question about passing iterators to a function. I want to create a function that does something with STL container iterators. The container of the iterator can vary, so I use a template container there. Here is the code:
-
template <class Container, class T>
-
void do_sth(typename Container<T>::iterator &start, typename Container<T>::iterator &end, T &elem)
-
{
-
//Some code here
-
}
-
I get compilation error (unrecognizable template declaration/definition) in MS VC++ 8.0.
Helps would be appreciated. Thanks...