Finding the index when using a vector<>::iterator
<p>I wonder if there is a way to get the index of random access iterator. For example:</p>

<pre><code>int myIndex = -1;
for(std::vector&lt;std::string&gt;::iterator iter = myStringVec.begin();
    iter != myStringVec.end();
    iter++)
{
  if(someFunction(*iter))  //got a hit on this string
    myIndex = ...
}
</code></pre>

<p>Beg you pardon if this is super trival.  An obvious solution would be to iterate by index, but my thinking is that was thinking for random access iterators, there might be a way for the iterator to tell you what it's index is, like <code>myIndex = iter.index()</code></p>
