摘要: 类的成员函数末尾加const的作用 结论: 1.非const对象可以访问const成员函数和非const成员函数 2.const对象不能访问非const成员函数,可以访问const成员函数 3.const成员函数不能修改成员属性 #include <iostream> using namespace 阅读全文
posted @ 2022-08-13 10:58 小柴i 阅读(59) 评论(0) 推荐(0) 编辑