class D is derived from class A. Class A has a protected method virtual foo(). In the implementation of a method of class D, is it allowed to use foo() on an object of class D, but different than this?
otherObject.foo(); //Is this allowed?
I get a compiler warning that the method foo is protected. So I ended up declaring D as a friend to B. Please clarify the concept/scope of protectedness here.