C ++ overload operators (operator overloading)

Operator overloading implemented by a function, which is essentially a function of the overload.

Operator overloading is actually the definition of a function, to achieve the desired functionality within a function, when used in this operator, the compiler will automatically call this function.

You can operator运算符name this portion is considered the function name, for example operator+.

Guess you like

Origin www.cnblogs.com/xiaobaizzz/p/12355294.html
Recommended