class CL1{ public: CL1(){}};class CL2:private virtual CL1{};class CL3:private virtual CL1{}; class CL4:public CL2,public CL3{public: CL4():CL1(),CL2(),CL3(){}}; int main(){ CL4 cl4; return 0;}
Standard input is empty
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(){} ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!