Why I can\'t cast a pointer to derived class to reference to pointer to base class?
struct Base { }; struct Derived : Base { }; int main() { Derived* de
if you want a reference you need to do
Base* ptr = static_cast(derived); Base &ref = *ptr;
you cant cast a pointer to a reference - they are quite different things