Message from C, C++ talks

July 2019

— Pretty much that's it

— 👌

— Thanks

— I know that it's an if statement but what does it evaluates to?


The comma operator returns the last operand. It's been used for a lot of (doubtful) things. It even led to some library implementors to think about it's overloading (yes, you can overload the comma operator)

— Was this for me?

— Nope

— I tried to explain it earlier

(2,1,0) returns zero
i=0 returns zero
if(0) evaluates as false
And you got Hello from that branch

Message permanent page

— How does it work

— Which step?

— 3 params in one parantheis

— Oh, wait sry, I thought it's you asked the initial question :)

— Https://

— Its comma operator... Google it

— Comma can be used as an operator too ...