title: is there prettier syntax for a c++ iterator?
body: <p>Is there a prettier / less-verbose way to use iterators in C++? From the tutorials I've seen, I either set up typedefs everywhere (which gets tedious to do for a lot of one-off for-loops):</p>
  
  <pre><code>typedef std::vector&lt;std:pair&lt;int, int&gt; &gt;::iterator BlahIterator;
  </code></pre>
  
  <p>or have verbose-looking for loops like:</p>
  
  <pre><code>for (std::vector&lt;std:pair&lt;int, int&gt; &gt;::iterator it = ... ) ...
  </code></pre>
  
  <p>Is there a better way?</p>