fork download
  1. class X {
  2. int x, y;
  3. public:
  4. X(int x_, int y_) : x(x_), y(y_) {}
  5.  
  6. friend X operator+(X const &a, X const &b) {
  7. return X(a.x+b.x, a.y+b.y);
  8. }
  9. };
  10.  
  11.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty