class, and you inherit your own class too, let's assume that you have a protected field size only in your class, that would work perfectly
Then, in the next lib version lib devs have decided to add size to their class
Now you are inheriting 2 classes with size field, what makes no sense at all, and how the data should be serialized, if you have multiple parents?
hm... didn't Stroustroup himself recommend to avoid stuff like creating an Object class? (I think your comment would be more about C# than C++)
Обсуждают сегодня