Purely guessworkWhy does C++ choose & as the reference symbol? I think reference is actually a kind of address, which can be compared to a pointer. A space will be opened in the fun function stack to store the address of variable a. To access a in fun, you may access a indirectly through the address
The concept of scope is the scope of declaration. It has nothing to do with the instance.
No. Simply change the parameter name to fun(int &b), can the scope of variable a be extended to fun
Purely guessworkWhy does C++ choose & as the reference symbol? I think reference is actually a kind of address, which can be compared to a pointer. A space will be opened in the fun function stack to store the address of variable a. To access a in fun, you may access a indirectly through the address
There is no variable scope expansion, it is just a reference transfer of variables
This question is so retarded, I want to ask you how you learned it