0
Casting to ref.
Is there any different to casting to a type or a type&, whats the ref. refering to? https://code.sololearn.com/cwk9z4ZsOVzk/?ref=app
1 Antwort
0
Replace the second line by-
int &x2 = x1;
This will give you the same output. It just means that you have created a reference for x1. It means now you can access the value 2 with the help of two variables x1 and x2.