Compiler Error C2326

'declarator' : function cannot access 'name'

An attempt was made to modify a member variable (typically from a friend function) without specifying an object.

The following is an example of this error:

class X
{
    int a;
    friend void f(X *p) { a = 10; } // error
};