摘要: 1.有时候返回引用可以提高效率,有些情况不能返回引用类的赋值运算符函数中,返回对象的引用可以显著提高效率。view plaincopy to clipboardprint?class String { public: String & operate=(const String &other); // 相加函数,如果没有friend修饰则只许有一个右侧参数 friend St... 阅读全文
posted @ 2010-10-06 15:50 陈峰 阅读(1090) 评论(0) 推荐(1)