C++ uses short circuit evaluation, if the whole conditions's result is known, the compiler do not waste to check the rest. Like
if(b<2 && (a=a+1)) printf("X\n"); never print, because a=a+1 never happen. So the compiler does not waste time to check the rest.
Subscribe to:
Post Comments (Atom)
a=a+1 it always true
ReplyDelete