Possible Duplicate:
Is there an Non-Short circuited logical “and” in C++?
C++ logical & operator
I have code similar to this:
return ( check1() && check2() && check3() && check4() );
The different check functions do other things besides just returning a value (eg printouts). It seems that the checkX
functions are run sequentially and as soon as one returns a 0 that the remaining are not run. This makes sense to do it this way. What is the best way (in the C++ code) to make sure that each function runs regardless of the other return values?