Order vs. Associativity
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2129230/cout-order-of-call-to-functions-it-prints">cout &lt;&lt; order of call to functions it prints?</a>  </p>
</blockquote>



<p>What is the difference between order and associativity when evaluating a compound expression?</p>

<p>In the following example, I don't see the effect of order on the <code>result</code> of expression. The <code>result</code> is always <code>3</code> like the functions would have been called from left to right as arithmetic operators being left associative.</p>

<pre><code>#include &lt;iostream&gt;
using std::cout;
using std::endl;

int Func1(int &amp;i)
{
    return i;
}

int Func2(int &amp;i)
{
    return i++;
}

int main()
{
    for (int index = 0; index &lt; 999999999; index++)
    {
        int i = 0;

        int result = (Func2(i) + Func1(i) + Func1(i) + Func2(i));

        cout &lt;&lt; result &lt;&lt; endl;
    }
}
</code></pre>
