What is the use of "," during a C ++ cycle?
1 answer
This is the comma operator, also known as the evaluate and forget operator. Effect a, b:
- Evaluate
a, including any side effects - Discard its value (i.e. do nothing with it)
- Estimate
b - Use the result
bas the result of the whole expressiona, b
:
commandcin, ,command"END"
&& , , cin >> command (.. , END). , , (, , , command END), && ( ).
+19