Basic concept: Quote

xiaoxiao2021-03-06  58

Quote is a syntax

This sentence means that reference is determined by the operation defined on it, not specific implementation. Quote, that is, a pointer is a conclusion that is seen from an implementation angle. In fact, not all references use pointers Realization, the reference to local variables is a significant example. Even if the function parameter is referenced, if the compiler determines the inline, then there is no need to turn into a pointer. In terms of the bottom, the pointer is just a syntax, not reference "Deep" or "underlying".

Quote is the alias of the variable

This is the key to correct understanding. We can see a separate individual, but there is a "synchronization mechanism" between them, making it reflected in another. Or imagine into a certain Two different items in a table point to the record of the same number.

Citation differences in pointers

The reference is always referred to, it is always empty. Although there is a mandatory means to distort this nature, this practice is not practical.

The reference is always directed to the same variable, and the specifically manifested the address of its address, the address of the original variable, and the pointer always points to the address of the current variable or NULL.

转载请注明原文地址:https://www.9cbs.com/read-113670.html

New Post(0)