title: Get index of the matching item from vector c++
body: <p>I'm iterating through a map, that map value type is vector. I'm getting vectors in the map one by one and searching for a item using std::find() method. </p>
  
  <pre><code>for(BoundWaysMap::const_iterator iterator  = boundWays.begin(); iterator != boundWays.end(); iterator++) 
  {
      string wayId = iterator-&gt;first;
      std::vector&lt;string&gt; nodesRefCollection = iterator-&gt;second;
  
      if(std::find(nodesRefCollection.begin(), nodesRefCollection.end(), id)!=nodesRefCollection.end())
      {
          std::string cont = "|" + wayId;
          legsFrame.append(cont);
          legsCount ++;
          isFound = true;
      }    
  }
  </code></pre>
  
  <p>I want to get the index of the found item form the find method.</p>