An operation of the form op x or x op, where op is an overloadable unary operator, and x is an expr
An operation of the form x op y, where op is an overloadable binary operator, x is an expression of
Overload resolution is a compile-time mechanism for selecting the best function member to invoke gi
运算符重载是c++的又一个先进功能。它使用户可以对自己定义的对象使用运算符像对int、float使用一样方便、简洁、形象,增加程序的可读性。重载运算符既可以用友元函数,也可以用成员函数。推荐使用成员函
For an operation of the form ?x, unary operator overload resolution (?4.2.3) is applied to select a
For an operation of the form x - y, binary operator overload resolution (?4. 2.4) is applied to sele
For an operation of the form x * y, binary operator overload resolution (?4. 2.4) is applied to sele
For an operation of the form x + y, binary operator overload resolution (?4. 2.4) is applied to se
The ?: operator is called the conditional operator. It is at times also called the ternary operator
For an operation of the form x + y, binary operator overload resolution (?4. 2.4) is applied to sele