'class1' : cannot access 'access' 'member' declared in class 'class2'
The member cannot be accessed from class1 because class1 does not have access rights. The member was not accessed.
To avoid this warning, give class1 access to members of class2 by changing the class access specifier or using the friend specifier.