title: C++ Using std::set<> in std::map<>
body: <p>I'd like to use std::set in std::map </p>
  
  <p>I haven't much exp with std:: containers, so i am not sure if i am using it right.
  I am trying to process set of values and in each set is another set of values.</p>
  
  <pre><code>map&lt;string, set&lt;string&gt; &gt; data_map;
  
  data_map["KEY1"].insert("VAL1");
  data_map["KEY1"].insert("VAL2");
  
  data_map["KEY2"].insert("VAL1");
  data_map["KEY2"].insert("VAL3");
  </code></pre>
  
  <p>I get error here when i try to access set in map (inner for-cycle)</p>
  
  <pre><code>error: no match for call to ‘(std::set&lt;std::basic_string&lt;char&gt; &gt;) ()’|
  error: no match for call to ‘(std::set&lt;std::basic_string&lt;char&gt; &gt;) ()’|
  
  
  for( map&lt;string, set&lt;string&gt; &gt;::iterator mip = data_map.begin();mip != data_map.end(); ++mip) {
      for ( set&lt;string&gt;::iterator sit = mip-&gt;second().begin(); sit != mip-&gt;second().end(); ++sit )
          cout &lt;&lt; *sit &lt;&lt; endl;
  
  }
  </code></pre>
  
  <p>Could you please tell me how i can iterate all values?</p>