On Tue, Nov 25, 2008 at 11:48 AM, Tyler Littlefield <[EMAIL PROTECTED]> wrote:
> Hello,
> I did a google for this, and came up with the wrong results.
> I've got a line of code that reads:
> str=i==1?"is"||"are";
> the compiler is choking; ideas would be great, not sure what I"m messing up.
should be
str = i == 1 ? "is" : "are";
It's known as the tertiary or ternary operator, BTW.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi