Suppose I have the following two statements
base* b = ...;
fnl * c = dynamic_cast<fnl*>(b); //Statement A
fnl& d = dynamic_cast<fnl&>(*b); //Statement B
I wanted to know exactly what the difference between statement A and statement B is. I understand that statement A casts and returns a pointer while statement B returns a reference. In case of A is it upto the user to free memory of c ?