fork(2) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct A {};
  6. struct B : A {};
  7. struct C : A {};
  8. struct D : B, C {};
  9.  
  10. int main() {
  11. A *a[5];
  12. a[0] = new A;
  13. a[1] = new B;
  14. a[2] = new C;
  15. a[3] = new D;
  16.  
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:15: error: ‘A’ is an ambiguous base of ‘D’
stdout
Standard output is empty