关于在这种情况下使用 const

问题描述

Header file has this.
std::string m_StrId;

Source file has this.
const std::string& getStringId() const { return  m_StrId; }

我看到了这两行代码。 这里第二个常量的目的是什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)