copy constructor问题。# Programming - 葵花宝典
j*g
1 楼
How would a copy constructor behave if the class had an Object as a member
Variable?
在C++里面你必须call member object的copy constructor, 或使用初始化。如果
override了operator=也可以用=进行赋值。
Is it a complete answer? Or anything else need to say?
在Java里好像啥都不用做,只用赋值就行了吧?
Variable?
在C++里面你必须call member object的copy constructor, 或使用初始化。如果
override了operator=也可以用=进行赋值。
Is it a complete answer? Or anything else need to say?
在Java里好像啥都不用做,只用赋值就行了吧?