The following code is giving me the error that 'A' is an inaccessible base of 'B' and I am not sure why:
class A {};
class B : protected A {};
A foo( A a );
///
B b;
foo(b);
Any explanation for this much appreciated.
Edit: I suppose I am just confused about the nature of protected inheritance. I thought it meant that any derived class (in this case of A) could inherit its variables and its functions.