int a = b ? c : a
could someone please point me to a page that explains what the code fragment in the subject title means? I have seen this in some uncommeted code but have no idea what it means (though do have an inlinking).techyoung
[230 byte] By [
techyounga] at [2007-11-27 4:48:19]

It's wrong because a is undefined. So it's probably a compiler error.
int a = b ? c : d;
would be more appropriate, assuming c and d are ints and b is a boolean. It's called a ternary operator. It's shorthand for this:
int a;
if(b)
a = c;
else
a = d;
? :That's the ternary operator.It's kind of a check statement."b ? c : a"> means, If "b" is true, then return "c", otherwise return "a"