vendredi 6 novembre 2015

What is the advantage of commas in if statement ? c++

We can write if statement as

if ( a == 5, b == 6, ... , thisMustBeTrue )

and only the last condition should be satisfiable to enter if body,

My question is what is the advantage of commas in if or while statement? Why is it allowed ?

Aucun commentaire:

Enregistrer un commentaire