3 ms·
Made even more obscure by using dark grey on black. I didn't know you could overload the comma operator that way. The comma operator was for use in C macros, f
by Animats 10y ago
Made even more obscure by using dark grey on black.
I didn't know you could overload the comma operator that way. The comma operator was for use in C macros, for when multiple expressions were necessary. It should have been deprecated in C++.
The comma operator has different precedence inside and outside square brackets.
tab(1,2)
is a function call with two arguments.
tab[1,2]
is an invocation of the comma operator. You can't overload "operator[]" with multiple arguments and simulate multidimensional arrays.