[ create a new paste ] login | about

Link: http://codepad.org/6E6NzdVl    [ raw code | output | fork ]

C++, pasted on Dec 10:
1
2
3
4
5
6
7
8
9
#include <algorithm>

int main() {
  const std::string str = "abfaabsd";
  
  std::cout << std::count(str.begin(), str.end(), 'a') << std::endl;
 
  return 0;
}


Output:
1
3


Create a new paste based on this one


Comments: