conversion from derived * to base * exists but is inaccessible
You need:
class d : public c
class
inheritance is private
by default.
When you privately inherit from a class
or a struct
, you explicitly say, among other things, that direct conversion from a derived type to a base type isn't possible.