Hello, everyone. I have a question to ask. According to The C++ Programming Language (3rd. Ed.) by Bjarne Stroustrup on page 405: "Members declared protectedare far more open to abuse than members declared private . In particular, declaring data members protected is usually a design error. Placing significant amounts of data in a common class for all derived classes to use leaves that data open to corruption. Worse, protected data, like public data, cannot easily be restructured because there is no good way of finding every use. Thus, protected data becomes a software maintenance problem."
Now I have a class for which I think a protected member is needed, it is an Image class that relys on a Bitmap data structure(declared as protected), and an ImageSection class(used to represent a part of an Image) inheriting from Image which also relys on the Bitmap data structure and some other attributes. So I am wondering whether this is a design error, if so, how to design these two classes?