Like any other built-in type, a pointer defined within a block scope will have an indeterminate value if it is not initialized 2 . A method that defines a pointer type defines several pointer variables in a statement that must precede each variable with a symbolic pointer to store the address of an object, and to obtain an address, you need to use the address character (operator &) int ival = 42 ; int *p = &ival;p = &ival *p = 42 ;p the address of the storage variable ival, Or P is a pointer to the variable ival &ri = Ruiyruiy store Ri's address ri operation Ruiy object ri = 100 ruiy =-100 Span style= "color: #000000"; references are not objects, no actual addresses, and pointers to references cannot be defined;
The value of the pointer (address) should belong to the following 4 states pointing to an object pointing to the next position of space immediately adjacent to the object null pointer means that the pointer does not point to any invalid pointer to an object.
1 trying to use uninitialized variables The 2 pointer does not point to any specific object, and attempting to access such pointer object behavior does not allow
C++