카타 8급 All Star Code Challenge #18

C++[ | ]

#include <string>
unsigned int strCount(std::string word, char letter){
  return count(word.begin(), word.end(), letter);
}
#include <string>
unsigned int strCount(std::string word, char letter){
  int res = 0;
  for(char c: word) {
    if( c == letter ) res++;
  }
  return res;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}