title: Passing by reference does not change the variable
body: <p>I am trying to implement a function to change state of the menu, but my reference is lost when it leaves the function:</p>
  
  <pre><code>void gotoLowerlevel(Menu *item)
  {
      if (item-&gt;chld != 0x00) {
          item = item-&gt;chld;
      }
  }
  </code></pre>
  
  <p>The function call is done in this manner (<code>currentState</code> is a pointer to <code>struct Menu</code>):</p>
  
  <pre><code>case ENTER:
      if (cnsle-&gt;inMenuFlag == 0)
      {
          cnsle-&gt;inMenuFlag = 1;
          cnsle-&gt;currentState = cnsle-&gt;root;
          gotoLowerlevel(cnsle-&gt;currentState);
          displayMenu(cnsle-&gt;currentState,&amp;cnsle-&gt;display);
      }
  </code></pre>
  
  <p>I have no idea why this isn't working. Any ideas?</p>