title: Assigning array to std::vector gives incorrect output
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int p[5] = {1,2,3,4,5};
  vector&lt;int&gt; x(p[0], p[4]);
  
  class Polynomial {    
  };
  
  int main(){
      Polynomial Poly;
  
      unsigned int i;
  
      for(i = 0;i&lt;=4; i++)
          cout&lt;&lt; x[i]&lt;&lt;endl;
  
      return 0;
  
  
  }
  </code></pre>
  
  <p>The above code outputs:</p>
  
  <blockquote>
    <p>5<br>
    -1073741824<br>
    0<br>
    -1073741824<br>
    -2018993448  </p>
  </blockquote>
  
  <p>Whereas I expect it to output</p>
  
  <blockquote>
    <p>1<br>
    2<br>
    3<br>
    4<br>
    5</p>
  </blockquote>
  
  <p>Why is the output incorrect, and what am I doing wrong?</p>