title: Pass by reference and value in C++
body: <p>I would like to clarify the differences between by value and by reference.</p>
  <p>I drew a picture:</p>
  <p><img src="https://i.stack.imgur.com/fNEsL.jpg" alt="Enter image description here" /></p>
  <p>So, for passing by value, a copy of an identical object is created with a different reference, and the local variable is assigned the new reference, so to point to the new copy</p>
  <p>How should I understand the following?</p>
  <blockquote>
  <p>If the function modifies that value, the modifications appear also
  within the scope of the calling function for both passing by value and by reference</p>
  </blockquote>