Hello, Mikel Astiz wrote:
> I'm sure it must be a compiler-configuration issue but, why can't > I > compile this? > > template <typename T> > class CAutoVector : public std::vector<T> > { > iterator it; > }; The name "iterator" as you intended depends on the template arguments, so you have to qualify it, and you have to tell the compiler to parse it as typename, instead of e.g. a member name with the keyword typename. In the case you got these errors from switching to gcc-3.4 or later, see the docs of gcc-3.4 for a list of compiler changes. These changes have been done to get compliant to the C++ standard. The compiler has to reject your code. template <typename T> class CAutoVector : public std::vector<T> { typename std::vector<T>::iterator it; }; BTW, STL classes are generally not meant to be publically inherited from. Bernd Strieder _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus