
25 Nov
2004
25 Nov
'04
3:15 a.m.
It looks interesting. I've only read the Starter Kit page so far. You went from this (without using the library): find_if(c.begin(), c.end(), &is_odd)
To: find_if(c.begin(), c.end(), is_odd(arg1));
Actually, it's this:
bool is_odd(int arg1) { return arg1 % 2 == 1; }
find_if(c.begin(), c.end(), &is_odd)
to this:
find_if(c.begin(), c.end(), arg1 % 2 == 1)
That seemed to be an intermediate stage as you then took it further and made a functor. If you'd stopped the tutorial at the above line I'd have had no complaint :-). Darren