C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
C2606
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2606
 
     'class::identifier': illegal private access declaration
 
     The access of the specified identifier was adjusted in the private
     part of the derived class declaration.
 
     The access to a member of a base class in a derived class can
     only be adjusted by mentioning its name in the public or protected
     part of the derived class declaration.
 
     The following are examples of this error:
 
          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
          };
                                    -♦-