fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A
  5. {
  6. int t;
  7. A& add(const A& a) { return *this = *this + a; }
  8. friend A operator+(const A& a, const A& b)
  9. {
  10. A temp;
  11. temp.t += a.t + b.t;
  12. return temp;
  13. }
  14. };
  15.  
  16. int main() {
  17. // your code goes here
  18. return 0;
  19. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty