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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -