[Solved] Upcast, downcasting, and hiding methods in C++ [closed]

About question #1: yes, if you provide a factory method along with your ‘simple’ interface: class B { public: static B * create(); virtual void simple() = 0; }; in B’s implementation file (cpp): B *B::create() { return new D(); //or whatever ‘hidden’ implementation } About your #2: hiding functionality means simplification in the first … Read more