Quote:> Thanks. This works. Any idea why?
In you function 'vector<T>::iterator' is a name depending on a template
argument, in this case the type 'T'. For dependend names you have to
use 'typename' to indicate that the name refers to a type. Otherwise
the name is not considered to be a type. The reasons why this is need
are somewhat obscure, though... (when using the separation model the
compiler needs to tell what is going on without have access to the
actual instantiation; in this case, there are situations where the
compiler cannot deduce whether a name would be a type or not).
Sent via Deja.com http://www.deja.com/
Before you buy.