Compiler Error C2606 (Windows CE 5.0)
'class::identifier': illegal private access declaration
The public or protected part of a derived class can adjust access to a member of a base class. The private part cannot.
The following example shows ways this error might occur.
struct X
{
private:
int priv;
protected:
int prot;
public:
int pub;
};
struct A : public X
{
private:
X::priv; // error
X::prot; // error
X::pub; // error
};
struct B : protected X
{
private:
X::priv; // error
X::prot; // error
X::pub; // error
};
struct C : private X
{
private:
X::priv; // error
X::prot; // error
X::pub; // error
};
Send Feedback on this topic to the authors