Monday, November 5, 2018

c++ - How do we use a abstract class as a function return type?

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?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...