fork(1) download
  1. #include <iostream>
  2.  
  3. struct foo{
  4. foo ( const foo & other )
  5. {
  6. std::cout << "Copy Constructor" << std::endl;
  7. }
  8. foo ()
  9. {
  10. std::cout << "Default Constructor" << std::endl;
  11. }
  12. };
  13.  
  14. int main(){
  15.  
  16. foo obj;
  17. foo objTwo = foo();
  18.  
  19. return 0;
  20.  
  21. }
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
Default Constructor
Default Constructor