How do I use the conditional operator?

Posted by Jeremy Rudd on Stack Overflow See other posts from Stack Overflow or by Jeremy Rudd
Published on 2008-12-25T16:27:10Z Indexed on 2010/05/06 17:48 UTC
Read the original article Hit count: 205

Filed under:
|

I've always wondered how to write the "A ? B : C" syntax in a C++ compatible language.

I think it works something like: (Pseudo code)

If A > B
   C = A
Else
   C = B

Will any veteran C++ programmer please help me out?

© Stack Overflow or respective owner

Related posts about c++

Related posts about conditional-operator