Boost logo

Boost Users :

From: Moshe Matitya (Moshe.Matitya_at_[hidden])
Date: 2006-09-10 04:57:00


> Eric Fowler wrote:
>
> ...
>
> ////////This 'if' is skipped, the code acts like
> nChk > nTopWgt is always TRUE, even when it ain't!!
> if(nChk > nTopWgt);

Well, of course it acts like its always true -- the if condition is
followed by an empty statement.
Any decent compiler would optimize this out.

Moshe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net