Is there a way with 1 line of code that reads strings from standard input and only adds the strings that are less than 5 characters long?
something like this but then with a predicate?
Code:copy(istream_iterator<std::string>(std::cin),
istream_iterator<std::string>(),
back_inserter(v)); // add only certain ones?