This documentation is archived and is not being maintained.

Compiler Error C2241

Error Message

'identifier' : member access is restricted

Code attempts to access a private or protected member.

To fix by using the following possible solutions

  1. Change the access level of the member.

  2. Declare the member a friend of the accessing function.