ITHelpself / CPlusPlus

0 stars 0 forks source link

2. literal #2

Open ITHelpself opened 3 years ago

ITHelpself commented 3 years ago

// this


struct S {
 int x;
 S& operator=(const S& other) {
 x = other.x;
 // return a reference to the object being assigned to
 return *this;
 }
};