 <p>You haven't initialized <code>it</code>. Try this:</p> <pre><code>std::vector&lt;Enemy*&gt;::iterator it; for(it=tracked.begin();it!=tracked.end();it++){ (*it)-&gt;update(timeSinceLastFrame); } </code></pre>