复制构造函数不工作?
Why doesn't my copy constructor work?
为什么没有我的复制构造函数的工作吗?
Why ampersand is used in copy constructor?
为什么连字号用于复制构造函数?
Why doesn't the copy constructor get called?
为什么不复制构造函数被调用?
Is this implicitly calling a copy constructor?
这是隐式调用复制构造函数?
Why does this code invoke the copy constructor?
为什么这段代码调用复制构造函数?
Modeling constructor, destructor, and copy constructor.
建模构造函数、分析构造函数,以及拷贝构造函数。
The copy constructor is called when a not yet existing!
调用拷贝构造函数不存在!
Why am I not provided with a default copy constructor from a volatile?
我为什么不具有挥发性的默认的复制构造函数?
Copy constructor is needed only in the case of dynamic memory allocation?
拷贝构造函数只在需要的情况下动态内存分配吗?
You didn't define a copy constructor so a default one was created by the compiler.
你没有定义复制构造函数,默认的是由编译器创建的。
The C++ standard allows for the copy constructor to be elided in certain situations.
c++标准的允许拷贝构造函数要省略在某些情况下。
The idea is to create a protected copy constructor aside from the default constructor.
保护的想法是创建一个拷贝构造函数除了默认构造函数。
C + + : which is the appropriate constructor to be called: the constructor or the copy constructor?
C + +:这是被称为适当的构造函数构造函数或复制构造函数?
The first case is redundant, why declare the copy constructor, make it private, and not implement it.
第一个病例是多余的,为什么声明拷贝构造函数,使其私人,不实现它。
Listing 2 shows a piece of code that results in a compile-time error because the copy constructor is private.
清单2显示了产生编译时错误的代码部分,因为该拷贝构造函数是私有的。
You do not need a copy constructor, and you need never sweat the gory details of implementing a clone method.
您不需要使用复制构造函数,并且永远也不需要大汗淋漓地去实现clone方法的那些令人惨不忍睹的细节。
The assignment operator is applied on a initialized object, but this is not the case in the copy constructor.
赋值运算符是应用于一个初始化的对象,但这并不是拷贝构造函数的情况下。
The noncopyable class definition presents no surprises, as the copy constructor and operator= are declared private.
noncopyable类定义没有什么令人感到新奇的地方,因为copy constructor和operator= 声明为 private。
How else could you use that return instruction to create and return an object and yet not use the copy constructor?
不然你怎么使用返回指令创建并返回一个对象而不使用复制构造函数?
If a class defines a copy constructor, acopy assignment operator, or a destructor, then it should define all three.
假定一个类界讲了拷贝机闭函数、赋值操纵符、析构函数中的一个,那么一样平常需供齐数界讲那仨函数。
In the first case, you are essentially declaring a private copy constructor and then not providing any implementation.
在第一种情况下,你基本上是声明一个私有拷贝构造函数,然后没有提供任何实现。
If you do not write a correct code for the copy constructor, object within a list will have some data members uninitialized.
如果你没有为拷贝构造函数写正确的代码,就有可能造成list中对象的某些数据成员没有初始化。
When I return by value from an assignment operator, firstly what is the mechanism and basis of calling the copy constructor?
当我返回值赋值操作符,首先是调用复制构造函数为基础的机制?
The only other thing to note in Listing 17 is that the definitions for the copy constructor and operator= methods are not provided.
清单17中要注意的另一点是,未提供copy constructor和operator=方法的定义。
Put the functionality you need in separate functions called by the destructor and the copy constructor and the assignment operator.
放在单独的功能调用析构函数和拷贝构造函数和赋值运算符你所需要的功能。
The copy constructor is a special kind of constructor which creates a new object which is a copy of an existing one, and does it efficiently.
拷贝构造函数是一种特别的构造函数,用于复制已经存在的对象到新生成的对象,这是一种高效的方式。
Again, if you don't provide a copy constructor, the compiler generates one for you, again just copying the members using the copy constructor.
再一次,如果你不提供一个拷贝构造函数,编译器生成一个你,再一次复制使用拷贝构造函数成员。
Often I desire a copy constructor which initializes each member variable as a copy, rather than default constructing and then assigning. e. g.
经常我渴望一个拷贝构造函数初始化成员变量作为一个副本,而不是默认的构造,然后分配。
Often I desire a copy constructor which initializes each member variable as a copy, rather than default constructing and then assigning. e. g.
经常我渴望一个拷贝构造函数初始化成员变量作为一个副本,而不是默认的构造,然后分配。
应用推荐