const对象和const成员函数

来源:互联网 发布:算法的特征是什么 编辑:程序博客网 时间:2024/04/29 23:22



1、const对象只能访问const成员函数。

2、const成员函数不能修改任何数据成员。

原创粉丝点击