To manage a class with pointer members, we must define all three copy-control members: the copy constructor, assignment operator, and the destructor.
为了管理具有指针成员的类,必须定义三个复制控制成员:复制构造函数、赋值操作符和析构函数。
The only reliable way to do it is to also export a class factory function, a simple function that USES the new operator to create the object and return the pointer.
唯一可靠的方法就是也出口类工厂函数,一个简单的函数,使用新的操作符来创建对象并返回的指针。
Also, the dereference operator, which allows reading and writing to a pointer.
另外还用作取消引用运算符,允许读取和写入指针。
Also, the dereference operator, which allows reading and writing to a pointer.
另外还用作取消引用运算符,允许读取和写入指针。
应用推荐