Here is my code -
#include using namespace std; class base { public: void sid() { } }; class derived : private base { public:
I suspect the problem is that you can't convert a derived pointer to a base pointer, as the inheritance is private.