C++: pass variable by value
<p>This is the situation:</p>

<pre><code>int f(int a){
    ...
    g(a);
    ...
}

void g(int a){...}
</code></pre>

<p>The problem is that the compiler says that there is no matching function for call to g(int&amp;). It wants me to pass the variable by reference and g() recieves parameters by value.</p>

<p>How can I solve this?</p>
