1.什么是运算符重载 运算符重载是一种函数重载. 运算符函数的格式:operatorop(argument-list)例如,operator+()重载+运算符.其中的op,必须是有效的C++运算符,如operator@()会报错,因为C++中没有@运算符. 2.重载运算符的使用 如下例所示: class Test { public: Test operator+(Test &test); } 调用运算符函数的方式有两种:Test t1;Test t2;1)普通函数调用Test t3 = t1.o…