Returning parent type in C++ interfaces
<p>When using interfaces in c++; You have your abstract (parent) class. Then you have the child class which inherits from the parent class and implements the pure virtual functions.</p>

<p>When another class uses the (child) interface, what is the point in the abstract class at this point? If you try to use the parent type in a function, i.e returning the type Parent, you get compiler errors (presumably because the compiler doesn't know how much memory to allocate).</p>

<p>Can anyone tell me how to do the above?</p>

<p>i.e</p>

<p>Parent = Shape.
Child = Rectangle.
Thrid class which contains method which returns the type Shape?</p>

<p>Thanks in advance for any help/information.</p>
