Hi all,
Why in the following example can the derived class not see the base class:
class base
{
private:
int a;
friend class derived;
}
class derived : public base
{
public:
derived() : a(0) { ; } //error a is private
}
why doesn't the friend declaration allow access to a? is it because it is not inherited in the derived class?