c++ - What does the comma operator do? -


what following code in c/c++?

if (blah(), 5) {     //do } 

comma operator applied , value 5 used determine conditional's true/false.

it execute blah() , (presumably), comma operator employed , 5 thing used determine true/false value expression.


note , operator overloaded return type of blah() function (which wasn't specified), making result non-obvious.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -