dimanche 4 juin 2017

C++ Check if one of multple values lower than int [duplicate]

This question already has an answer here:

I`m currently trying something with C++ and want to make the code a bit cleaner.

My if-statement is

if(value1 < 1 || value2 < 1)  

My question is if there is a way to make this shorter like

if(value1 or value2 < 1)

Do I already have the shortest solution or is there a better way to make it?

Thanks in advance Tim

Aucun commentaire:

Enregistrer un commentaire