Compiler Error C2243

'conversion type' conversion from 'type1' to 'type2' exists, but is inaccessible

A pointer to a derived class was converted to a pointer to a base class, but the derived class inherited the base class with private or protected access.

The following is an example of this error:

class B {};
class D : private B {};

D d;
B *p = &d;      // error