2009年2月26日

《Effective C++》读书笔记10:令operator=返回一个引用指向*this

摘要: 一般的连锁赋值方式: int x, y, z; x = y = z = 15;//等价于x = (y = (z = 15)); 当我们要实现自己的operator=操作时,就需要返回一个引用,该引用指向了操作符左侧的参数; Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlight... 阅读全文

posted @ 2009-02-26 22:12 月光笛手 阅读(355) 评论(0) 推荐(0)

导航