fork(2) download
  1. class Base
  2. {
  3. virtual ~Base()=0; /* A */
  4. };
  5. Base::~Base() { }
  6. class Derived : protected virtual Base
  7. {
  8. ~Derived() /* B */
  9. { }
  10. };
  11. int main()
  12. { }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In destructor 'virtual Derived::~Derived()':
prog.cpp:5:1: error: 'Base::~Base()' is private
 Base::~Base() { }
 ^
prog.cpp:9:2: error: within this context
  { }
  ^
stdout
Standard output is empty