title: How to save position of min_element result?
body: <p>How can I save the value of min_element?  It says it's a forward iterator but I can't seem to figure out how to save (assign to a variable to) it.  I want to be able to access it by location in the vector.  All I can find is examples of using the actual element (using *min_element() ).  I tried </p>
  
  <p><code>iterator&lt; forward_iterator_tag, vector&lt;string&gt; &gt; min_word_iterator = min_element(first_words_in_subvecs.begin(), first_words_in_subvecs.end());</code> </p>
  
  <p>but that didn't work.  I'm going to replace the element at that index with a different element.</p>