title: C++ inline function, parameter passed by value
body: <p>well last time I checked an inline function is a function whose body is substituted directly in every point in the program where the function is called.
  So when I do this :</p>
  
  <pre><code>#include &lt;iostream&gt;
  inline void increment(int n) { n = n + 1; }`
  int main() { 
     int n = 0;
     increment(n);
     std::cout &lt;&lt; "Result " &lt;&lt; n;
  }
  </code></pre>
  
  <p>I should have : Result 1. 
  Instead, I get 0.</p>
  
  <p>So how does an inline function work ?</p>