const 对象只能调用const函数

来源:互联网 发布:单片机串口线 编辑:程序博客网 时间:2024/06/07 16:15

const对象只能调用const函数,所以类似get之类的成员函数尽量都声明为const函数。

原创粉丝点击