Home » Category » C & C++

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

200| Mon, 12 May 2008 15:15:00 GMT| mark_mcintyre| 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 & Tags: three, perfectly, acceptable, c++

URL: http://programming.itags.org/c-c++/199418/
 
«« Prev - Next »» 0 helpful answers below.

C & C++ Hot Answers

C & C++ New questions

C & C++ Related Categories