Let Wallet be a class that represents the amount of coins and bills in a purse. The class has
got a data element amount of type long. The binary operator += shall be overloaded as an
inline method. Identify the error in the following definition.
Wallet& operator+=(Wallet& w)
{ // add the amount contained in another purse
Wallet* this;
this->amount += w.amount;
w.amount = 0L;
return *this;
}
Can somebody explain me this?