ternary operator c++ | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

ternary operator c++

I have written below code but it is giving error. How to fix it and correctly use ternary operator in c++? https://code.sololearn.com/cabPunzipfOp

15th Feb 2022, 5:00 PM
Gajendra Sonare
Gajendra Sonare - avatar
2 Réponses
+ 2
"continue" and "break" are statements, not expressions.
15th Feb 2022, 5:20 PM
Arsenic
Arsenic - avatar
0
break and continue doesn't make any sense in your code that's why you are getting error.. Do you just want to know how to use ternary operator ???
15th Feb 2022, 5:17 PM
Davinder Kumar
Davinder Kumar - avatar