my understanding tells me that it should work anyway, because s derives from Base and prot_mem is protected member of Base Class, which should have already access to Sneaky
No, protected variable prot_mem
can only be accessed by derived class member, but not by third party class member, like class Pal
, if Pal
is not a friend of Base
.