Question 10
Back to Exercise
What is the rule of three?
- A Every class needs three constructors
- B A class that needs a custom destructor, copy constructor or copy assignment usually needs all three Correct
- C Classes should have at most three members
- D Use three levels of inheritance
Correct Answer: Option B
All three deal with the same owned resource. C++11 extends it to the rule of five with the move operations.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!