pointer list of class

hi

i have to make a list of a class, of the style:

class Expl;
[...]

class Otherexpl{
private:
list<Expl*> pointerlist;
}

when i've addet a certain number of elements with the push_back function, how can i aftrewards make a for(...){} with all the elements of the list?, because the operator [] doesn't exist for list.
i found under this link: http://www.yolinux.com/TUTORIALS/LinuxTutorialC++STL.html#LIST
an example for a list<int>, but how can i do it for my version? i haven't found out after trying alot...
Last edited on
Topic archived. No new replies allowed.