@andy1cplusplus That's terrible advice. Inheritance is something that helps you design your code in such a way as to model specific relationships between entities, not a cheat to give classes access to other classes' protected members. If you start using inheritance willy-nilly like that, your code is going to become a horrible mess, with all sorts of unintended consequences.
I mean, it's not as if C++ doesn't already provide a much better mechanism to allow classes to access the private members of other classes where there's a specific relationship between those two classes - friendship. If you need to do this, use friendship rather than inheritance.
The real solution is to design your classes to have the right interface, so that other classes can use them in appropriate ways.