Search:
Forum
General C++ Programming
get positive values from a vector
get positive values from a vector
Apr 13, 2010 at 8:33am UTC
mirauta
(12)
Hello,
From the vector {1,2,-3,-4,5} I need to get only the positive values.
Is there a way to do that except looping?
Thanks,
Bogdan
Apr 13, 2010 at 9:05am UTC
imi
(426)
http://www.cplusplus.com/reference/algorithm/find_if/
but if you never used STL-algorithms, get a good textbook or tutorial
before
you encounter your first compiler error message. ;)
Ciao, Imi.
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs