 <p>Change</p> <pre><code>noteIT &lt; trackIT-&gt;getNoteList().end() </code></pre> <p>To</p> <pre><code>noteIT != trackIT-&gt;getNoteList().end() </code></pre> <p>Not all iterators support less than / greater than comparisons.</p> <p>If you have c++11 you can use a range-based for loop:</p> <pre><code>for (Note&amp; note : trackIT-&gt;getNoteList()) </code></pre> <p>Or you can use BOOST_FOREACH</p> <pre><code>BOOST_FOREACH (Note&amp; note, trackIT-&gt;getNoteList()) </code></pre>