title: Convert iterator to int
body: <pre><code>int i;
  vector&lt;string&gt; names;
  string s = "penny";
  names.push_back(s);
  i = find(names.begin(), names.end(), s);
  cout &lt;&lt; i;
  </code></pre>
  
  <p>I'm trying to find index of an element in vector. It's ok with <code>iterators</code>, but I want it as <code>int</code>. How can I do it?</p>