Re: Reference to a pointer of another type
I am confused about what you mean, but how about
Code:
class A{};
class B : public A{};
int main()
{
A* pA = new B;
B& pB1 = static_cast<B&>(*pA);
}
and with *& as an example
Code:
class A{};
class B : public A{};
int main()
{
A* pA = new B;
B* pB1 = static_cast<B*>(pA);
B*& pB2 = pB1;
}
0100 0111 0110 1111 0110 0100 0010 0000 0110 1001 0111 0011 0010 0000 0110 0110 0110 1111 0111 0010
0110 0101 0111 0110 0110 0101 0111 0010 0010 0001 0010 0001 0000 0000 0000 0000 0000 0000 0000 0000