代码改变世界

随笔档案-2010年11月24日

[C++再学习系列] 二元操作符重载

2010-11-24 12:48 by zhenjing, 1236 阅读, 收藏,
摘要: 二元操作符重载的具体实现的标准方法如下:T& T::operator@=( const T& ) { // … implementation … return *this;}T operator@( const T& lhs, const T& rhs ) { T temp( lhs ) return temp @= rhs;} 阅读全文