What's the C++ way of returning a derived type as a abstract type in a function with this caveat?
Say the function creates a derived type and wants to return that object as the abstract base type. How do you do that in C++ without resorting to messy C like pointers?