Question about Inheritance / Method overriding C++
<pre><code>class Class1
{
public:
    void print()
    {
        cout &lt;&lt; "test" &lt;&lt; endl;
    }

    void printl()
    {
        print();
    }
};

class Class2 : public Class1
{
public:
    void print()
    {
        cout &lt;&lt; "test2" &lt;&lt; endl;
    }
};
</code></pre>

<p>Why does print() not get overridden in Class2, is there any way a function can be overridden like this? (Without virtual functions). Thanks</p>

<pre><code>    Class2 t;
    t.printl();
</code></pre>
