title: STL cloning a vector
body: <p>!Hi
  I have a hard time trying to copy vector of pointers to Point.
  I have a </p>
  
  <pre><code>vector&lt;Point*&gt; oldVector
  </code></pre>
  
  <p>and I want to copy this vector into other vector. So I used a copying constructor. I did this that way</p>
  
  <pre><code>vector&lt;Point*&gt; newVector = vector&lt;Point*&gt;(oldVector.begin(),oldVector.end());
  </code></pre>
  
  <p>Unfortunately I get an exception/error if I ran this function.</p>
  
  <blockquote>
    <p>vector interators incompatible</p>
  </blockquote>
  
  <p>What may be the problem ??</p>
  
  <p>EDIT
  There must be a bigger problem with iterators, it seems that I can't use iterators at all. I wanted to add two stl vectors into each other so I used wrote sth like this</p>
  
  <pre><code> vector&lt;int&gt; a, b;
      b.insert(b.end(), a.begin(), a.end());
  </code></pre>
  
  <p>and I get the sama exception/error during execution of this line</p>
  
  <p><img src="https://i.stack.imgur.com/TXwdr.jpg" alt="enter image description here"></p>