Inheritance: Function that returns self type?
<p>Let's say I have two classes:</p>

<pre><code>class A
{
    public:
    A* Hello()
    {
        return this;
    }
}

class B:public class A
{
    public:
    B* World()
    {
        return this;
    }
}
</code></pre>

<p>And let's say I have an instance of B class like so:
    B test;</p>

<p>If I call test.World()->Hello() that would work fine.
But test.Hello()->World() would not work since Hello() returns A type.</p>

<p>How could I make Hello() return the type of B? I don't want to use a virtual function since we have over 20 different classes inheriting A.</p>
