Question 11
Back to Exercise
Which member is a good candidate for mutable?
- A The account balance
- B A cache of a computed value or a call counter that does not change the object's observable value Correct
- C The object's ID
- D A const data member
Correct Answer: Option B
mutable members may change inside const functions; using it for real state would make const meaningless.
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!