prog.cpp: In member function 'void ThirdClass::demoMethod(BaseInterface&)':
prog.cpp:19:43: error: cannot allocate an object of abstract type 'Derived'
auto buffer=dynamic_cast<Derived&>(obj);
^
prog.cpp:6:7: note: because the following virtual functions are pure within 'Derived':
class Derived: public BaseInterface {
^
prog.cpp:8:22: note: virtual void Derived::someMethod1()
virtual void someMethod1()=0;
^
prog.cpp:19:10: error: cannot declare variable 'buffer' to be of abstract type 'Derived'
auto buffer=dynamic_cast<Derived&>(obj);
^