Ill formed code snippets
<p>can somebody please tell me the difference between the following two code snippets:</p>

<pre><code>//Code snippet A: Compiles fine
int main()
{
    if(int i = 2)
    {
        i = 2 + 3;
    }
    else
    {
        i = 0;
    }
}

//Code Snippet B: Doesn't compile :(
int main()
{
    if((int i = 2))
    {
        i = 2 + 3;
    }
    else
    {
        i = 0;
    }
}
</code></pre>

<p>If you notice the diff is just an extra parenthesis at if statement. I am using g++ compiler.Error is "expected primary-expression before âintâ"</p>
