fork(1) download
  1. #include <iostream>
  2.  
  3. class X
  4. {
  5. public:
  6. X(int q) {}
  7.  
  8. ~X()
  9. {
  10. std::cout << "~X()" << std::endl;
  11. }
  12. private:
  13. X(const X&);
  14. {
  15. std::cout << "copy ctor" << std::endl;
  16. }
  17. };
  18.  
  19. int main()
  20. {
  21. X x = 1;
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 2728KB
stdin
Standard input is empty
compilation info
prog.cpp:14: error: expected unqualified-id before '{' token
prog.cpp: In function 'int main()':
prog.cpp:13: error: 'X::X(const X&)' is private
prog.cpp:21: error: within this context
stdout
Standard output is empty