fork(1) download
  1. class CL1
  2. {
  3. public:
  4. CL1(){}
  5. };
  6. class CL2:private virtual CL1{};
  7. class CL3:private virtual CL1{};
  8.  
  9. class CL4:public CL2,public CL3
  10. {
  11. public:
  12. CL4():CL1(),CL2(),CL3(){}
  13. };
  14.  
  15. int main()
  16. {
  17. CL4 cl4;
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 3292KB
stdin
Standard input is empty
compilation info
prog.cpp: In constructor ‘CL4::CL4()’:
prog.cpp:2:1: error: ‘class CL1 CL1::CL1’ is inaccessible
 {
 ^
prog.cpp:12:11: error: within this context
     CL4():CL1(),CL2(),CL3(){}
           ^
stdout
Standard output is empty