Possible Duplicate:
C++ Comma Operator
I am initializing an array with
int main()
{
int arr[3]= { (1,3), 2, 4 };
cout << arr[0] << " " << arr[1] << " " << arr[2] << endl;
}
I thought it would give a compile time error but it is running fine. The array is initialized with values 3,2,4
and output is also 3 2 4
.
Can someone explain what is happening here ?