$ cat inheritance.cpp #include using namespace std; class A { }; class B : private A { }; int main() { A* ab = new B; } $ $ g++ inheritance.
Private inheritance means that outside the derived class, the inheritance information is hidden. That means you can't cast the derived class to the base class: the relationship isn't known to the caller.