title: Why does call-by-value example not modify input parameter?
body: <p>In the following call-by-value example, I cannot understand why this code is not changing the value of the 5 to a 6. </p>
  
  <p>Line 11 calls the function changeValue which has the value 6, so I would have thought 6 should be output, however 5 is still output?</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  void changeValue(int value);
  
  int main()
  {
    int value = 5;
    changeValue(value);
  
    cout &lt;&lt; "The value is : " &lt;&lt; value &lt;&lt; "." &lt;&lt; endl;
  
    return 0;
  }
  
  void changeValue(int value)
  {
    value = 6;
  }
  
  // This doesn't change the value from 5 to 6. 5 is output?
  </code></pre>