vendredi 27 mars 2020

is there any way to apply if statement to all variables in c++

if statements are usually implemented as if(variable > value) what if I have a number of values and they all have an operation for example a decrement operation and I want that if any of these values reaches to 0 the program should replace it to 100. Is there a simple way to do that?

Aucun commentaire:

Enregistrer un commentaire