title: How to store the vector.begin() iterator of template type in thrust?
body: <p>When I attempt to assign a variable to that iterator, i get the error: <code>expected a ";"</code>, where <code>vec</code> is a <code>thrust::device_vector&lt;my_type&gt;</code>, <code>j</code> is some <code>int</code>, and <code>my_type</code> is a template type:</p>
  
  <pre><code>for (thrust::device_vector&lt;my_type&gt;::iterator i = vec.begin(); i &lt; vec.end(); i += j) Foo(i);
  </code></pre>
  
  <p>Is this the correct way to loop over the vector? Am I declaring <code>i</code> as the correct type?</p>