Boost logo

Boost Users :

From: Kevin Heifner (heifner_k_at_[hidden])
Date: 2006-02-25 10:20:30


yinglcs2_at_[hidden] wrote:
> What is the easiest way to use boost::lambda library
> with count_if to count how many item is less than
> 0.05?
>
> I try the following, but that not work:
> int no = count_if(myList.begin() myList.end(), _1 <
> 0.05);

I think we are going to need more information. Can you provide
more of the code? This looks fine except you are doing a literal
floating point comparison. Be careful with literal floating
point comparisons in general.

KevinH

-- 
Kevin Heifner  heifner @ ociweb.com  http://heifner.blogspot.com
           Object Computing, Inc. (OCI) www.ociweb.com

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