Question: Suppose you are implementing an assignment operator, a copy constructor, and an operator +=. For which of these functions do you need to worry about

Suppose you are implementing an assignment operator, a copy constructor, and an operator +=. For which of these functions do you need to worry about possible "self-application" (where the argument is the same as the object that activates the function):

A. Only one of the three functions has possible self-application

B. The assignment operator and the copy construtor have possible self-application

C. The assignment operator and the operator += have possible self-application

D. The copy construtor and the operator += have possible self-application

E. All three functions have possible self-application

When a class uses dynamic memory, what member functions should be provided by the class?

A. The assignment operator.

B. The copy constructor.

C. A destructor.

D. All of the above.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!