I ran into an error yesterday and, while it\'s easy to get around, I wanted to make sure that I\'m understanding C++ right.
I have a base class with a protected memb
As mentioned, it's just the way the language works.
Another solution is to exploit the inheritance and pass to the parent method:
class Derived : public Base { protected: int d; public: void DoSomething(const Base& that) { Base::DoSomething(that); d=0; } };