title: C++ STL: list with Pointers - Iterator cannot access?
body: <p>I am struggeling with an STL list that holds Pointers of my "Object" object.</p>
  
  <p>I declared:</p>
  
  <pre><code>list&lt;Object*&gt; objectlist;
  </code></pre>
  
  <p>and inserted via:</p>
  
  <pre><code>this-&gt;objectlist.push_back(new Object(address,value,profit));
  </code></pre>
  
  <p>and tried to iterate like in maps and others:</p>
  
  <pre><code>list&lt;Object*&gt;::iterator iter;
  
  iter = this-&gt;objectlist.begin();
  
  while(iter != this-&gt;objectlist.end())
  {
      iter-&gt;print();
  }
  </code></pre>
  
  <p>Where print() is a public Method of class Object;</p>
  
  <p>Whats wrong here? </p>
  
  <p>I cannot access via iterator to the objects in the list ?</p>