This question already has an answer here:
- How do I use the conditional operator? 6 answers
I was looking in my friends notes and I saw this code
years = y >= 18 ? y : 18;
all what I know about the ? in c++ it's act like if statement
can I have some help with it ?
like how to write it with if
Aucun commentaire:
Enregistrer un commentaire