title: How to convert a std::set of strings to lowercase c++ using some combination of for_each, transform, iterators and lambda?
body: <p>I'm trying to convert a set of strings to lowercase without using low level loops like while and for(;;) because I'm practicing using the STL. I was thinking about using for_each and transform and lambda but I'm not really sure how they work.</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iterator&gt;
  #include &lt;algorithm&gt;
  #include &lt;set&gt;
  using namespace std;
  int main()
  {
      set&lt;string&gt; words;
      //insert a bunch of words using words.insert().....
      //convert everything in words to lower case
      return 0;
  }
  </code></pre>
  
  <p>How would I convert each string in the set <code>words</code> using any combination of for_each, transform, iterators and lambdas?</p>
  
  <p>I was thinking of doing something like: <code>transform(words.begin(), words.end(), words.begin(), ??lambda??)</code> however I don't know how to do the 4th parameter</p>