fork(4) download
  1. struct A
  2. {
  3. virtual void test()=0;
  4. };
  5.  
  6. struct B : A
  7. {
  8.  
  9. };
  10.  
  11. int main()
  12. {
  13. B b;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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()
stdout
Standard output is empty