Solved

To Prevent Class Objects from Being Copied or Assigned, You

Question 29

Multiple Choice

To prevent class objects from being copied or assigned, you can:


A) Declare as private the class's copy constructor and overloaded assignment operator.
B) Declare the class's copy constructor and overloaded assignment operator with with = delete after the parameter list.
C) Simply do not declare a copy constructor or assignment operator in the class.
D) (a) or (b) .

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents