Hi. How do I access a member of an Associate object held in lista using an iterator like below?
typedef list<Associate>::iterator iter;
void display(list<Associate>& lista)
for (iter through=lista.begin(); through!=lista.end(); ++through)
cout << i << ". number is:" <<?????????<< "\t" << endl;
I can't find anything in my books about it i've tried replaceing the ???? with lista.name.... lista(name).... lista(through.name) and several other things but I can't figure it out.
This is just an example i'm trying to get to work so that I can write other functions like search using iterators but I can't figure out how to access the memebers of the Associate held in list.