Question 16
Back to Exercise
What is the main purpose of the pimpl idiom?
- A Faster function calls
- B Hiding private members from the header, so changing them does not force users to recompile and the binary interface stays stable Correct
- C Allowing multiple inheritance
- D Avoiding constructors
Correct Answer: Option B
Private members are part of the class definition users include; pimpl moves them behind an opaque pointer.
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!