int a = something == 1 ? 1
: something == 2 ? 2
: (assert(0), 0);
FWIW I personally find this kind of code horrid. I would re-write to: assert (something == 1 || something == 2); int a = (something == 1 || something == 2) ? something : 0; R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
