您的位置: 首页 > 文章 > 基础学习(二) 基础学习(二) 分类: 文章 • 2023-12-16 20:41:22 operator overloading 理论知识: 操作符本质上也是一个函数运算符。即运算符重载也就是函数进行重载。 例如: 函数外重载:这一种是非成员函数,(这里面是没有this指针) inline complex operator + (const complex&,const complex&y){ return complex(reaal(x)+real(y), imag(x)+imag(y)); }