????1. ???????????
????1.1?????

 

L/*???????*/ # /*??????*/ R/*???????*/
L#R
=> L.operator#(R) ????????д?????У???????????
=> operator#(L??R) ??????? //??????????????????
?磺
cout << c1;
=> cout.operator<<(c1)
=> operator<<(cout??c1)
1.2?????????:
???? operator+(const ????& ??????)
{ return ????(...??....);//?????????????????}
???? operator-(const ????& ??????)
{ return ????(...??....);//?????????????????}
????& operator+=(const ????& ??????)
{ return *this = *this + ??????;}
????& operator-=(const ????& ??????)
{ return *this -= *this - ??????;}

????2. ??????????????
????2.1?????

 

#/*??????*/O/*??????*/
=>O.operator#();//??????
=>operator#(O); //???????
?磺
cout << -c1 << endl;
c1.operator-();//??????????
operator-(c1)??//???????????

????2.2?????????:
???????? operator-(void)
????{ return ????(-...??-...);}
???????
??????????????????????????У???????ó?????????