Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Should the pointer in C++ be marked with * in use?
Should the pointer in C++ be marked with * in use?
Pointer types need to be marked with * when they are declared, which is a grammatical requirement.

The specific purpose is to use this kind of data itself, without an *.

Of course, you can bring it, but that's another way to use it.

int a = 123;

int * t = & ampa; //Declare an integer pointer variable T, pointing to the address of integer data A. ..

//Subsequent use

T = NULL// Point t to an empty address.

* t = 456// Assign a value to the data pointed by t..