C & C++: All three of these are perfectly acceptable.

  • mark_mcintyre / 200 / Wed, 24 Jun 2009 08:28:00 GMT / Comments (0)
  • >sin 1) if statements shouldn't act on the return value of the function if the function has side effects.
    >sin 2) putting a constnat on the left side of a conditional.
    >sin 3) assignment in a conditional expression. All three of these are perfectly acceptable. Indeed (2) is in many people's views a /good/ idea. As for (1) and (3), they're so commonplace they're prasctically mandatory.

    >sin 4) sscanf(). Why not just scanf()?Are you off your rocker?

    >sin 5) trailing opening curly brace.I kind of agree with this one.

    1/5 is pretty poor...
    --
    Mark McIntyre
  • Keywords:

    three, perfectly, acceptable, c++

  • http://programming.itags.org/c-c++/199418/«« Last Thread - Next Thread »»