'class1' : no path to 'access' 'member' declared in virtual base 'class2'
The given member of the virtual base class cannot be accessed from the derived 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.