STL vector trouble
Linux, Apache, MySQL, PHP
1
Posts
1
Posters
0
Views
1
Watching
-
Imagine the following class that is inherited from std::vector
template<typename ObjType>
class myclass : public std::vector<ObjType*>
{ ... fancy stuff ... }This class is basically an extended vector; it compiles fine under VS 2005, but fails to compile under Linux. It always throws an error about missing type specifiers when using an iterator, like
iterator it = begin();
. Anyone has an idea what the cause might be? I think it is trying to use std::iterator, even though the function exists in myclass, and so it should have the iterator type (if I don't includeusing namespace std;
, the code fails with an unknown type "iterator", that's why I'm assuming the above). Again, it compiles fine under Windows.