Hi Name lastlong,
>But don't you think that C compiler (gcc) also output this error?
It's not an error in C, therefore a C compiler would be non-compliant to the C standard if it produced an error. (And it would break a lot of correct code.)
>My observation is gcc outputs error only if we try to initialise both instant of "a".
In C, there is only one instance of "a".
Stroustrup talks about C/C++ incompatibility in his C++ Programming Language (3rd and Special editions) on B.2.2.
HTH, --Eljay