I created a vector of pointers
vector<Person*> *personVec = new vector<Person*>();
Person contains:
getName();
getAge();
If I try to use the iterator it doesn't work.. Here is how I use it:
vector<Person>::iterator it;
for(it = personVec->begin() ;
it != personVec->end() ;
++it)
{
cout << it->getName() << endl;
}
I tried vector<Person*>::iterator it;
but no luck with that either.
Thanks.