FAQ: I've been told to never use protected data, and instead to always use private data with protected access functions. Is that a good rule? ←(in the new Super-FAQ)
It's in Section: Inheritance — basics:
- FAQ: Is inheritance important to C++?
- FAQ: When would I use inheritance?
- FAQ: How do you express inheritance in C++?
- FAQ: Is it OK to convert a pointer from a derived class to its base class?
- FAQ: What's the difference between public, private, and protected?
- FAQ: Why can't my derived class access private things from my base class?
- FAQ: How can I protect derived classes from breaking when I change the internal parts of the base class?
- FAQ: Protected data vs. private data with protected access functions? (this FAQ)
- FAQ: Okay, so exactly how should I decide whether to build a "protected interface"?