fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. class A
  4. {
  5. public:
  6. A(int i) {}
  7.  
  8. private:
  9. A(const A&);
  10. A& operator=(const A&);
  11. };
  12.  
  13. int main() {
  14. A a = A(9);
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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);
           ^
stdout
Standard output is empty