Hello everyone,
I am shamed to ask this question because I can not figure out after some experiment. I think for reference variable, once it is binded, the target can not be changed.
But why in my following sample, pi can be binded to a and later binded to b without any issues?
Code:int main() { int a = 10; int b = 20; int& pi = a; pi = b; return 0; }
thanks in advance,
George