会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Heath Leger
博客园
首页
新随笔
联系
订阅
管理
2022年3月31日
为什么函数在返回对象类型的时候一般返回引用而不直接返回目标类型?
摘要: 研究下面代码到底有什么区别 inline Screen &Screen::move(int x, int y) { return *this; } inline Screen Screen::move1(int x, int y) { return *this; } 没有&符号时, 函数会返回thi
阅读全文
posted @ 2022-03-31 10:29 Heath Leger
阅读(57)
评论(0)
推荐(0)
编辑
公告