title: find chars/string in string from vector c++
body: <p>I have a vector of strings, and I want to count all 'Ace' in the vector. Right now I can only find one...</p>
  
  <pre><code>int main()
  {
      std::vector&lt;string&gt; vec;
      vec.push_back("Ace of Spades");
      vec.push_back("Ace");
      string value = "Ace";
      int cnt = 0;
      auto iter = find_if(begin(vec), end(vec), [&amp;](const string &amp;str)
      {
          return str.find(value) != str.npos;
      });
      if(iter == end(vec))
          cout &lt;&lt; "no found" &lt;&lt; endl;
      else 
      {
          cout &lt;&lt; *iter &lt;&lt; endl;
          cnt++;
          cout &lt;&lt; cnt++ &lt;&lt; endl;
      }
  }
  </code></pre>