About pointer, mouse pointer
AboutPointerNote:
1,All basic data types are eventually interpreted as binary codes. That is to say, given a binary code, it may be mapped to an int or a char, float, double and other data types.
2,After a pointer is declared, the operating system does not allocate space for it. Therefore, Initialization is required before the access pointer.
3,If you know why the pointer is initialized, initialize it to this address; otherwise, it is initialized to NULL. A program with good style will check it before the pointer is referenced. This initialization policy can reduce the debugging time.
4,The left value indicates the object stored in computer memory, and the left value is equivalent to the address value. Right Value: When a symbol or constant is placed on the right of the operator, the Computer Reads their "right value", which is the actual value. The right value is equivalent to the data value.
5,& A can only be used as the right value.
6,Define char * string; then the expression * string ++ executes the process: (1) ++ operator generates a copy of string (2) then ++ operator increases the value of string (3) finally, perform the indirect access operation on the string copy.
This expression is often used in loops! Note: ++ operator has a higher priority *
7,The pointer array ends with a NULL pointer.
** 8, ** p is a pointer, and the result of p + 1 (pointer and integer addition) is irrelevant to the type. If p is int, an int is added to p, which is four bytes. If p is char, a char is added to p.