fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Test
  5. {
  6. public:
  7. Test()
  8. {
  9. cout << "default\n";
  10. }
  11.  
  12. Test(const Test&)
  13. {
  14. cout << "copy\n";
  15. }
  16.  
  17. Test& operator = (const Test&)
  18. {
  19. cout << "assign\n";
  20. return *this;
  21. }
  22. };
  23.  
  24. int main() {
  25. Test t = Test();
  26. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
default