prog.cpp: In function ‘int main()’:
prog.cpp:21:11: error: cannot declare variable ‘d’ to be of abstract type ‘Derived’
Derived d;
^
prog.cpp:13:8: note: because the following virtual functions are pure within ‘Derived’:
struct Derived : Base
^
prog.cpp:8:6: note: virtual void Base::foo() const
void Base::foo() const
^