. During the value transfer process, parameters in the form of the called function are processed as local variables of the called function, that is, the memory space is opened in the stack to store the values of the real parameters put in by the main function, thus. The feature of value transfer is that any operation of the form parameter of the called function is performed as a local variable, without affecting the value of the real parameter variable of the main function. (The address value of the real parameter pointer will not change here)
. Because of this, any operation performed by the called function on the form parameter affects the real parameter variables in the main function.
, The reference is more than the pointer type check
. Because
.
.
. A reference must always point to some objects. Therefore, if you use a variable and direct it to an object, but the variable may not point to any object at some time, you should declare the variable as a pointer, in this way, you can assign a null value to the variable. On the contrary, if the variable must point to an object, for example, your design does not allow the variable to be empty, then you can declare the variable as a reference. "But please wait." You may doubt, "What are the consequences of such code? "
{
}//
V [5] = 10 ;//