struct A { virtual void test()=0; }; struct B : A { }; int main() { B b; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:13:7: error: cannot declare variable ‘b’ to be of abstract type ‘B’ prog.cpp:6:8: note: because the following virtual functions are pure within ‘B’: prog.cpp:3:18: note: virtual void A::test()
Standard output is empty