修饰成员函数 (常成员函数)
在常成员函数中,不能改变数据成员的值。
常成员函数只能调用const成员函数
常对象 常对象指针 常引用
const修饰数据成员
转载于:https://blog.51cto.com/5468775/2410233
修饰成员函数 (常成员函数)
在常成员函数中,不能改变数据成员的值。
常成员函数只能调用const成员函数
常对象 常对象指针 常引用
const修饰数据成员
转载于:https://blog.51cto.com/5468775/2410233