#include <iostream> using namespace std; class A { public: A(int i) {} private: A(const A&); A& operator=(const A&); }; int main() { A a = A(9); return 0; }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:9:2: error: 'A::A(const A&)' is private A(const A&); ^ prog.cpp:14:11: error: within this context A a = A(9); ^
Standard output is empty