- 2
What is comma operator ?
7 odpowiedzi
+ 2
Please specify language in Relevant Tags.
(Edit)
Wikipedia to the rescue (hopefully)
https://en.m.wikipedia.org/wiki/Comma_operator
+ 1
The comma operator is used when making multiple declarations on one line.
For example:
int x, y;
0
What language?
0
C++
0
Idrees Jahangir sorry but i don't know...
Anyway, you made the code easier to read for others. Well done!
0
Thanks
0
I found this helpful:
https://en.m.wikipedia.org/wiki/Comma_operator
In summery it calculates and discards of the first operand and evaluation and returns the second one
(if more than 2 operands, basically returns the last one)