Compiler Warning (level 3) C4248

'class1' : cannot access 'access' 'member' declared in class 'class2'

The given member cannot be accessed from this class because it did not have access rights. The member was not accessed.

This warning can be avoided by giving class1 access to members of class2 by changing the class access specifier or using the friend specifier.