Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Why not invent pointer variables instead of plastic variables to store them?
Why not invent pointer variables instead of plastic variables to store them?
In fact, from the implementation point of view, the pointer is an integer variable, which only stores one address value.

The concept of pointer and the type of pointer (different types of pointers may have the same value, but they are not equal, and the new address obtained by+1 operation is also different) are imposed by the compiler. After compilation, the pointer is actually an integer value used to store the address, without any other additional type information.

Therefore, the concept of pointer is invented to make programmers understand it better, and at the same time, it is used to constrain the compiler and make the program less prone to errors.