何时构造函数必须使用初始化列表而不是赋值

来源:互联网 发布:vc socket编程 重连 编辑:程序博客网 时间:2024/06/15 17:38

何时构造函数必须使用初始化列表而不是赋值

1.const - const only can be initialized but not assigned

2.reference - ditto

3.base class has no default construct

4.member function has no default construct

0 0
原创粉丝点击