I found a usage of () in this code
int a, b, c;
int x = (a= 2,b=5, a+b,++b );
cout<<x;
I can't find any exmaple in Microsoft Docs or other place. Have anyone tell me What is the role of ()?
I found a usage of () in this code
int a, b, c;
int x = (a= 2,b=5, a+b,++b );
cout<<x;
I can't find any exmaple in Microsoft Docs or other place. Have anyone tell me What is the role of ()?
This is just ()
around an expression.
The expression uses operator,
. operator,
takes the left hand argument, evaluates, it, discards it, then evaluates and returns the right hand argument. (Unless, of course, you overload it)