title: How to modify objects using an iterator? using <list>
body: <p>So here's an example. The star's <code>mLocation</code> and <code>mSpeed</code> are a <code>Vector3</code> custom type.</p>
  
  <p>I'v tried:</p>
  
  <pre><code>Star &amp;star = *iStar;
  Star star = *iStar;
  </code></pre>
  
  <p>Using <code>iStar-&gt;</code> directly doesn't work with my operators, not sure why.
  So whats the proper way to do that?</p>
  
  <pre><code>   void UniverseManager::ApplySpeedVector()
     { 
     std::list &lt;Star&gt;::const_iterator iStar;
  
         for (iStar = mStars.begin(); iStar != mStars.end(); ++iStar)
         {
             // how to I get a hold on the object the iterator is pointing to so I can modify its values
                     // i tried  Star &amp;star = *iStar;  this is illegal
                     // tried just using the iStar-&gt;mLocation += iStar-&gt;mSpeed this also fails due to the operator not accepting the values not sure why
                     // tried other things as well, so what is the proper way to do this?
  
             iStar-&gt;SetLocationData( iStar-&gt;mLocation += iStar-&gt;mSpeed);
         }
     }
  </code></pre>