Existe um operador ?: em C++ e sua forma básica é (condition) ? (something1) : (something2).
Para ilustrar:
if (condition)
something1;
else
something2;Escreva uma função que use o operador ?: para retornar "yeah" se b for true, e "nope" caso contrário.
yeahNope(true) ➞ "yeah"
yeahNope(false) ➞ "nope"N/A