I have my own templated vector class and im trying to use my vector
class in another templated class. im using GCC 4.0.1 on Mac OSX (if i
need to upgrade that isnt a problem) but i want to know if this is a
misunderstanding on my part or a compiler issue, or there is a work
arround without requiring a compiler upgrade.
my vector looks like
template<typename Tclass MyVector
{
private:
//data
public:
class iterator
{
//decl
}
};
the class im trying to use it in looks like
template<typename Tclass MyVectorUser
{
private:
MyVector<T *list;
void dosomething()
{
for(MyVector<T *>::iterator i = list.begin() ; i !=
list.end() ; i++)
{
//code
}
}
};
the way im using the MyVectorUser is like this
struct MyData
{
int x;
};
MyVectorUser<MyDatadata;
however i get a compile error from GCC "error: expected `;' before
'i'"
can anyone please give me some insight?