title: How does one iterate through an unordered set in C++?
body: <p>Suppose I have an unordered set</p>
  
  <pre><code>unordered_set&lt;int&gt; my_set;
  myset.insert(1);
  myset.insert(2);
  myset.insert(3);
  </code></pre>
  
  <p>How do I iterate through it? I don't need to iterate in any order - just as long as I reach each element once. I tried</p>
  
  <pre><code>for (int i = 0; i &lt; my_set.size(); i++)
       cout &lt;&lt; my_set[i];
  </code></pre>
  
  <p>to no avail.</p>