|
From: <au...@gm...> - 2006-05-16 16:21:21
|
Hi,
> list<string> mylist
>
> then added data
> mylist.push_back("A");
> mylist.push_back("B");
> mylist.push_back("C-VIP");
> mylist.push_back("D-VIP");
>
>
> Now, I would like to create another list for keeping track of the
> address of certain entries in the mylist class such as:
>
> list<whatever??> myptr;
>
> I would like myptr to have the addresses of the VIP entries above. Is
> that possible?
You can store iterators, pointing to the elements in the first list, to
the second list. Only don't forget, that iterators become invalid after
adding or removing elements from the first list.
--
Aurimas
|