title: Copies of a pointer into a pointer doesn't work in C
body: <p>I have a function with two pointers in parameters. The first pointers(Position *x) points on a struct which have values, the second on nothing(Position *y) (it has not been initialized yet). I try to copy my first pointer into the second and then to printf the values from the second pointer but it doesn't work. I don't understand. Does it mean that you can change the value of a pointer but not his adress since in reality C language always works by value(i mean in parameter transfer) ?</p>
  
  <pre><code>void waitDeplacement(Position *oldPosition, Position *newPosition, Sens *sens, Niveau *niveau)
  {   ...
      newPosition = oldPosition;
      printf("NEW POSITION x:%d / y:%d\n", newPosition-&gt;x, newPosition-&gt;y);
      ...
  }
  </code></pre>
  
  <p>Beside, When I use a deep copy:</p>
  
  <pre><code>*newPosition = *oldPosition;
  </code></pre>
  
  <p>it work. So why please ?</p>