:析构函数(Destructor)复制构造函数(copy constructor)复制赋值运算符(copy assignment operator)上述三个函数是特别的成员函数,假如程序员没有自行定义或是编写声明它们,那么编译器会自动地创建它们,并且会编译至应用程序内.
基于42个网页-相关网页
如何从复制赋值运算符调用复制构造函数?
How to call to the copy constructor from the copy-assignment operator?
现在,尝试为类a使用一个复制结构和运算符赋值,在清单15中声明该类。
Now, try using a copy construction and operator assignment for class a, declared in Listing 15.
所以到现在为止,赋值运算符复制了很多数据。
So the assignment operator thus far makes copies of things.
所以到现在为止,赋值运算符复制了很多数据。
应用推荐