If you want to cast a reference you usually do this:
But I have also seen people doing this:Code:Subclass &myref = (Subclass&)base_class_object_ref;
I understand how it works, but is there any difference? Is there a reason or a specific scenario where I must choose the one over the other?Code:Subclass &myref = *(Subclass*)&base_class_object_ref;
Thanks