A
André Castelo
Hi
I have a class X and I'm using a list to store X instances. Later in
the project I realized that I needed to search that list for certain
instances and I thought of storing the found objects in a vector<X *>.
My problem is - how can I run through list<X>, with a
list<X>::iterator, and use a pointer to point to the selected objects?
I'm thinking of rewriting all instances of list<X> and use list<X *>
in order to be compatible with the search function.
I have a class X and I'm using a list to store X instances. Later in
the project I realized that I needed to search that list for certain
instances and I thought of storing the found objects in a vector<X *>.
My problem is - how can I run through list<X>, with a
list<X>::iterator, and use a pointer to point to the selected objects?
I'm thinking of rewriting all instances of list<X> and use list<X *>
in order to be compatible with the search function.