title: Making my own Vector. Whats wrong with it?
body: <p>i am trying to make my own vector but i cant get it to work as i want.
  I get a error message on the Move-constructor it says: Exception thrown at 0x00007FF751A77ACC in auto-tests.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.</p>
  <p>The first one got solved. But now i got the same error with another part of the code. The push_back finction, here is the code.</p>
  <p>Here is the code for the move-constructor:</p>
  <pre><code>template&lt;typename T&gt;
  inline Vector&lt;T&gt;::Vector(Vector&amp;&amp; other)
      : m_nrOfElements(other.m_nrOfElements), m_capacity(other.m_capacity)
  {
  
      for (int i = 0; i &lt; m_nrOfElements; i++)
      {
          m_elements[i] = other.m_elements[i];   /// HERE IS WHERE THE ERROR IS!
      }
  
      other.m_elements = nullptr;
      other.m_capacity = 0;
      other.m_nrOfElements = 0;
  }
  </code></pre>