Created
April 6, 2014 11:42
-
-
Save quxiao/10004846 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count(const std::vector<std::string>& str_vec, const size_t threshold) | |
{ | |
int size = 0; | |
std::vector<std::string>::const_iterator it; | |
for (it = str_vec.begin(); it != str_vec.end(); ++ it) { | |
if (it->length() < threshold) { | |
++ size; | |
} | |
} | |
return size; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment