pointers - C++ difference between address -


I have the following structure for a node in a link list.

  struct node {difference information; Approval * Next; };  

I have declared P as an indicator in a structure (node) and have started it.

  node * p = new node;  

I do not understand the difference between p and and p , they are 2 addresses but they do not Should the same address?

  cout & lt; & Lt; P & lt; & Lt; "" & Lt; & Lt; & Amp; P;  

See this slightly differently:

  Structure node {int information; Node * next; }; Node n; // node only node * p = & amp; N; // p is a "node pointer" (node ​​*) /. Its value (node) keeps node address ** PP = & amp; P; // PP is an indicator of "node pointer" (node ​​**) // / value of it (node ​​*) p  

Does it clean a bit?


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -