|
vector of own objects
Hello,
Im trying to create a vector of objects of a class that I defined:
std::vector <element*> elementList;
within the element class I have a member function called checkNames which I try to use thus:
std::vector <element*>::iterator listIter;
for (listIter = this->elementList.begin( ); listIter < this->elementList.end( ); listIter++)
if (listIter->checkName (elementName))
..
The problem I am getting is that the compiler gives back the following message for the last line:
error C2839: invalid return type 'std::vector<_Ty>::_Tptr' for overloaded 'operator ->'
Does anybody know what I am doing wrong please?
Mark
|