title: Update (int) variable in C inside a function
body: <p>I'm trying to write a function that changes screen in my simple C snake game.</p>
  
  <pre><code>main(){
    int stage = 0;
    ...
    ..
    .
    while(stage!=0){
      //if snake hits wall
      changeStage(stage);
    }
  }
  </code></pre>
  
  <p>function:</p>
  
  <pre><code>void changeStage(int stage){
    stage = 1;
  }
  </code></pre>
  
  <p>This code does not update the code, it will keep on running. 
  What is wrong with my code?</p>