title: Fast search algorithm with std::vector<std::string>
body: <pre><code>    for (std::vector&lt;const std::string&gt;::const_iterator it = serverList.begin(); it != serverList.end(); it++)
      {
          // found a match, store the location
          if (index == *it) // index is a string
          {
              indexResult.push_back(std::distance(serverList.begin(), it)); // std::vector&lt;unsigned int&gt;
          }
      }
  </code></pre>
  
  <p>I Have written the above code to look through a vector of strings and return another vector with the location of any "hits".</p>
  
  <p>Is there a way to do the same, but faster? (If I have 10,000 items in the container, it will take a while).
  Please note that I have to check ALL of the items for matches and store its position in the container.</p>
  
  <p>Bonus Kudos: Anyone know any way/links on how I can make the search so that it finds partial results (Example: search for "coolro" and store the location of variable "coolroomhere")</p>