- 2

What is comma operator ?

3rd Feb 2019, 6:30 PM
Idrees Jahangir
Idrees Jahangir - avatar
7 odpowiedzi
+ 2
Please specify language in Relevant Tags. (Edit) Wikipedia to the rescue (hopefully) https://en.m.wikipedia.org/wiki/Comma_operator
3rd Feb 2019, 6:41 PM
Ipang
+ 1
The comma operator is used when making multiple declarations on one line. For example: int x, y;
3rd Feb 2019, 7:08 PM
Division by Zero
0
What language?
3rd Feb 2019, 6:56 PM
Billy Beagle
0
C++
3rd Feb 2019, 6:59 PM
Idrees Jahangir
Idrees Jahangir - avatar
0
Idrees Jahangir sorry but i don't know... Anyway, you made the code easier to read for others. Well done!
3rd Feb 2019, 7:00 PM
Billy Beagle
0
Thanks
3rd Feb 2019, 7:57 PM
Idrees Jahangir
Idrees Jahangir - avatar
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)
28th Dec 2022, 11:38 AM
Kian
Kian - avatar