wyqmx

导航

2023年8月3日 #

C++类成员:const 和 static用法

摘要: ​1.常量成员 const 类的常量成员,具备以下特性: 1.1.const成员必须被初始化 1.2.const成员只能在初始化列表中赋值 1.3.const成员不能在构造函数原型中赋值 1.4.const成员初始化之后无法更改 class ConstMember { public: ConstMe 阅读全文

posted @ 2023-08-03 21:57 无夜千幕雪 阅读(29) 评论(0) 推荐(0) 编辑