So, one day I forgot to put "max" before "() " in practice and got something like:
int a;
int arr[10] = {1,2,3,4,5,6,7,8,9,10};
for (int i=1; i<10; i++)
{
a = arr[i-1], arr[i]; //vs. a = (arr[i-1], arr[i]); 本地测试(gcc 8.1)
//前者取arr[i-1],后者取 arr[i]
}
after putting up a question here,
someone kindly pointed out how the comma operator works.
It seems to be something to be avoided, as it could be rather confusing and doesn't really have an exclusive functionality (tbd)
from https://en.cppreference.com/w/cpp/language/operator_other#Built-in_comma_operator
and the comma operator has the last precedence