Compiler Warning (level 3) C4243
Visual Studio .NET 2003
'conversion type' conversion exists from 'type1' to 'type2', but is inaccessible
A pointer to a derived class is converted to a pointer to a base class, but the derived class inherits the base class with private or protected access.
The following sample generates C4243:
// C4243.cpp
// compile with: /W3
struct B
{
int f()
{
return 0;
};
};
struct D : private B
// try the following line instead
// struct D : pubilc B
{
};
int main()
{
int (D::* d)() = (int(D::*)()) &B::f; // C4243
d;
}