title: Print the new value of an initialized integer after modifying it inside a void function?
body: <p>I would expect the following C++ code to print 6, but instead it prints 5. How would I change it so that the new value gets printed?</p>
  <pre><code>#include &lt;iostream&gt;
  
  void increment(int a) {
      a++;
  }
  
  int main() {
      int number = 5;
      increment(number);
      std::cout &lt;&lt; number; // prints 5, not 6
  }
  </code></pre>