title: Vector iterators
body: <p>I have a the following code.</p>
  
  <pre><code>vector&lt;IRD&gt;* irds = myotherobj-&gt;getIRDs();//gets a pointer to the vector&lt;IRD&gt;
  for(vector&lt;IRD&gt;::iterator it = irds-&gt;begin(); it &lt; irds-&gt;end(); it++)
      {
          IRD* ird = dynamic_cast&lt;IRD*&gt;(it);
          ird-&gt;doSomething();
          //this works (*it).doSomething();
  
      }
  </code></pre>
  
  <p>This seems to fail...I just want to get the pointer to each element in the vector without using (*it). all over.</p>
  
  <ol>
  <li>How do I get the pointer to the object?</li>
  <li>When I iterate over the vector pointer irds, what exactly am I iterating over? Is it a copy of each element, or am I working with the actual object in the vector when I say (*it).doSomething(),</li>
  </ol>