Home > Back-end >  The pointer variable * what do you mean
The pointer variable * what do you mean

Time:12-17

 

Int * p;
Int * p;//what is the difference between these two sentences?

Int * p;//after previously defined the pointer variable, the back reference p, sometimes "* p", sometimes it is "p", what does it mean ah

CodePudding user response:

Two can, no difference for the compiler, the compiler can normal analytical syntax
* on behalf of the variable type is a pointer
This personal preference int * p, type int * p said,
However, if multiple variables defined at the same time, such as
Int a, * p can't do this kind of circumstance, a is type int, p is type int *, but should with p *, otherwise can't define multiple variables at the same time the

  • Related