I have a type casting question. I saw method 2 in my code and it able to compile (The code is not written by me). Can I know what method2 mean? method 1 is understandable.
class Base {};
class Derived : Base {};
void main ()
{
//let say I want to type cast my base to derived
Base base;
Derived derived;
//method 1:
derived = (Base) base;
//method 2:
derived = (Base&) base;
}