Compiler Error C2326
TOC
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Compiler Error C2326

'declarator' : function cannot access 'name'

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

Example

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

   class MyClass
   {
   public:
      void mf()
      {
         i = 4;   // C2326, i is inaccessible
      }
   };
}
Show:
© 2016 Microsoft