class Interface{}; class Foo: public Interface{}; class Bar{ public: vector<Interface*> getStuff(); private: vector<Foo*> stuff; };
我该如何实现这个功能getStuff()?
getStuff()
c++ polymorphism casting vector
c++ ×1
casting ×1
polymorphism ×1
vector ×1