This question already has an answer here:
- How do I use the conditional operator? 6 answers
- What does '?' do in C++? 7 answers
I took few help online to complete my task. And I found this code but I do not know the actual working as I have never used such syntax before in c++. The (?) Question mark and (:) colon.Can any one provide a simple general syntax code explaining same line?
x = (i-coins[j] >= 0)? table[i - coins[j]][j]: 0;
Aucun commentaire:
Enregistrer un commentaire