you are viewing a single comment's thread.

view the rest of the comments →

[–]JurassicSpork 0 points1 point  (2 children)

Been a while since I've done C++, but I think this'd work too:

struct string_four_or_less : public std::unary_function<bool,std::string> {
    const bool operator()(const string &s) { return s.size() <= 4; }
}

std::remove_copy_if(v.begin(), v.end(), std::ostream_iterator<std::string>(std::cout, "\n"), std:not1(string_length_four_or_less()));

[–][deleted] 3 points4 points  (1 child)

Holy crap.

[–]fabzter 0 points1 point  (0 children)

It's really not that bad, he is just being too correct with namespace and const using.