class b { public : b(){} virtual ~b(){} private: b(const b&); }; class d : public b { public: d():b(){} ~d(){} }; int main() { d obj1; d obj2( obj1 ); }
Standard input is empty
prog.cpp: In copy constructor ‘d::d(const d&)’: prog.cpp:8: error: ‘b::b(const b&)’ is private prog.cpp:12: error: within this context prog.cpp: In function ‘int main()’: prog.cpp:21: note: synthesized method ‘d::d(const d&)’ first required here
Standard output is empty