fork download
  1. class A {
  2.  
  3. public:
  4.  
  5. A() {foo();}
  6.  
  7. virtual void foo() = 0;
  8.  
  9. };
  10.  
  11. class B : public A {
  12.  
  13. public:
  14.  
  15. B() : A() {}
  16.  
  17. void foo() override {}
  18.  
  19. };
  20.  
  21. int main(){
  22.  
  23. B b;
  24.  
  25. }
Runtime error #stdin #stdout #stderr 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
pure virtual method called
terminate called without an active exception