Here's my code:
template <typename container_type>
void transfer(container_type container, iterator begin, iterator end) {
for (; begin != end; begin++)
if (!element_in_container(container, *begin))
container.insert(iterator, *begin);
}
I get the error 'iterator is not a type'
.
I tried adding std::
or container_type::
before iterator
, didn't help. I tried defining the template as template <typename container_type<typename T> >
and the iterators as container_type<T>::iterator
, no luck. What's wrong?