Friday, April 27, 2012

using ternary operator c++


3 comments:

  1. I usually like parenthesis around the test like this:
    (nFirst > nSecond)

    Just to be clear.

    ReplyDelete
    Replies
    1. Actually that is a good way of coding.
      Keep it up.

      Regards,
      Support - ccplusplus.com

      Delete
    2. No problems, the only reason I always do that now is that I've learned many languages over the years and the order of AND OR and other operators is never consistent.
      You could say many of my tests are () parenthesis overloaded ... just to be sure of order and clarity.

      Delete