title: Pass by reference in C
body: <p>I'm trying to use pass by reference in C so that the function can modify the values of the parameters passed to it.  This is the function signature:</p>
  
  <pre><code>int locate(char *name, int &amp;s, int &amp;i)
  </code></pre>
  
  <p>However when I try to compile it I get this error that refers specifically to the above line:</p>
  
  <blockquote>
    <p>error: expected ‘;’, ‘,’ or ‘)’ before
    '&amp;' token</p>
  </blockquote>
  
  <p>If I remove the '&amp;' the program will compile, but it will not function correctly, obviously.  What's wrong here?  How can I make call by reference work?</p>