The nice thing about it, is you can use it in something like:
Code:
void* my_function (int is_true)
{
return (is_true ? 'e' : 10);
}
So if you dont want to do alot of if/else with the returning values, then you can use it as a shortcut..
And the examples you gave are also in that direction, nice and simple..
And the requirement for the sorrounding () in a cout statement is, because '<<' has higher precedence than the '?' operator.