Group: microsoft.public.vc.stl · Group Profile · Search for Sewcond in microsoft.public.vc.stl
Author: Jerry Coffin
Date: Sep 26, 2006 10:09
Angus Comber <nospam@gmail.com> wrote: I have a list like below: std::list<int> mylist; I just want to extract say the second item in the list. how do I do that? std::list<int>::iterator it; advance(it, index); int elem = *it; If you plan to do this often, understand that list is precisely the wrong kind of container to perform random access on. Consider vector or deque
|