Classes that have pointer members and use default synthesized copy control have all the pitfalls of ordinary Pointers.
具有指针成员且使用默认合成复制构造函数的类具有普通指针的所有缺陷。
To manage a class with pointer members, we must define all three copy-control members: the copy constructor, assignment operator, and the destructor.
为了管理具有指针成员的类,必须定义三个复制控制成员:复制构造函数、赋值操作符和析构函数。
Objects with pointer members often need to define the copy-control members.
具有指针成员的对象一般需要定义复制控制成员。
Objects with pointer members often need to define the copy-control members.
具有指针成员的对象一般需要定义复制控制成员。
应用推荐