How to initialize multiple variables in C++ to the same value?
<p>Would this kind of variable assignment work? </p>

<pre><code>double a = 2.0,
x, y, z = 0.5;
</code></pre>

<p>Would the second line of code work properly and initialize <code>x, y, z</code> each to 0.5?</p>