+ 3
How does "Reference" work? I can't understand it. Please!
2 Antworten
+ 5
Reference means alias of a variable, any change made to it will reflects the affect on variable and vice-versa.
e.g.
int a;
int& b = a; // this means b is an alias of a
a=16;
cout<<b;
Output:
16
+ 7
This could help you:
https://www.tutorialspoint.com/cplusplus/cpp_references.htm