fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A {
  5. public:
  6. A() { cout << "a" << endl;}
  7. A( A const& o) { cout << "b" << endl;}
  8. };
  9.  
  10. void Fa(A a){}
  11. void Fb(A &a){}
  12.  
  13. int main() {
  14. // your code goes here
  15. A a;
  16. Fa(a);
  17. Fb(a);
  18. A b(a);
  19. return 0;
  20. }
Success #stdin #stdout 0s 4200KB
stdin
Standard input is empty
stdout
a
b
b