Export (0) Print
Expand All

Compiler Error C2326

Error Message

'declarator' : function cannot access 'name'

The code tries to modify a member variable, which is not possible.

The following sample generates C2326:

// C2326.cpp
void MyFunc() {
   int i;

   class MyClass  {
   public:
      void mf() {
         i = 4;   // C2326 i is inaccessible
      }
   };
}

Show:
© 2014 Microsoft