title: using the `auto` keyword with STL iterators
body: <p>I'm following <a href="https://www.cprogramming.com/c++11/c++11-auto-decltype-return-value-after-function.html" rel="nofollow noreferrer">this</a> tutorial for using the <code>auto</code> keyword with STL iterators. </p>
  
  <p>It says that this syntax is OK for C++ 11. </p>
  
  <pre><code>vector&lt;int&gt; vec;
  auto itr = vec.iterator(); // instead of vector&lt;int&gt;::iterator itr
  </code></pre>
  
  <p>However, I get this compile error when I try it?</p>
  
  <blockquote>
    <p>error: invalid use of ‘std::vector::iterator’</p>
  </blockquote>