fork download
  1. class MyClass
  2. {
  3. private:
  4. MyClass(const MyClass&) {} // It shouldn't need this, right?
  5.  
  6. public:
  7. MyClass() {}
  8. MyClass(int i) {}
  9. MyClass& operator = (int) { return *this; }
  10. };
  11.  
  12. MyClass s = 5;
  13.  
  14. int main()
  15. {
  16.  
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4: error: ‘MyClass::MyClass(const MyClass&)’ is private
prog.cpp:12: error: within this context
stdout

Standard output is empty