title: Changing a Local Variable With a Different Function
body: <p>How can I change <code>number</code> in <code>get_number</code> using the function <code>increaseNumber</code> if <code>increaseNumber</code> has to be <code>void</code>?</p>
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  void increaseNumber(int64_t number){
      number++;
  }
  
  int64_t get_number(){
      int64_t number = 0;
      increaseNumber(number);
      return number;
  }
  
  int main(void){
  
      cout &lt;&lt; get_number();
  }
  </code></pre>
  <p>If it is of any help, I have tried changing an array rather than an integer and that worked fine.</p>