C++ Interfaces in stl::list
<p>LessonInterface</p>

<pre><code>class ILesson
{
    public:
        virtual void PrintLessonName() = 0;
        virtual ~ILesson() {}
};
</code></pre>

<p>stl container</p>

<pre><code>typedef list&lt;ILesson&gt; TLessonList;
</code></pre>

<p>calling code</p>

<pre><code>for (TLessonList::const_iterator i = lessons.begin(); i != lessons.end(); i++)
    {
        i-&gt;PrintLessonName();
    }
</code></pre>

<p>The error:</p>

<blockquote>
  <p>Description   Resource Path Location Type
  passing ‘const ILesson’ as ‘this’
  argument of ‘virtual void
  ILesson::PrintLessonName()’ discards
  qualifiers</p>
</blockquote>
