Returning multiple values and default parameters in C++
<p>I'm trying to make a function that takes in either 1 or 3 parameters, and returns either 1 or 3 values (based on parameters passed).</p>

<p>If 1 parameter is passed then the function uses default values for the other 2 arguments.
If 3 parameters are passed then it uses those values.</p>

<pre><code>bool foo( bool x, int &amp;y = 0, int &amp;z = 0) {

x = true; y = y + 1; z = z + 2;

return x;

}
</code></pre>

<p>Is this possible in C++ or am I confused with Java functions.</p>
