How do I iterate through a std::list<MyClass *> and get to the methods in that class from the iterator?
<p>If I have the list,</p>

<pre><code>typedef std::list&lt;MyClass *&gt; listMyClass;
</code></pre>

<p>How do I iterate through them and get to the methods in that class?</p>

<p>This is what I’ve tried, but that is not it:
(MyClass::PrintMeOut() is a public method)</p>

<pre><code>for(
    listMyClass::iterator listMyClassIter = listMyClass.begin();
    listMyClassIter != listMyClass.end();
    listMyClassIter ++)
{
    listMyClassIter-&gt;PrintMeOut();  
}
</code></pre>
