title: c++ array to vector issue
body: <p>Im  trying to copy an array to a vector, however, when the  data is copied to the vector its different from that of the original array. </p>
  
  <pre><code>int arraySize = 640000;
  
  std::vector&lt;unsigned char&gt; vector_buffer;
  unsigned char buffer[arraySize];
  
  populateArray(&amp;buffer);
  
  for(int i = 0; i &lt; arraySize; i++)
       cout &lt;&lt; buffer[i];  // this prints out data
  
  
  std::copy ( buffer, buffer + arraySize, std::back_inserter(vector_buffer)); 
  
  
  for(int i = 0; i &lt; arraySize; i++)
       cout &lt;&lt; vector_buffer[i];  // this prints out different data   
  </code></pre>
  
  <p>The data seems to get compressed somehow. Any approach at copying the array to a vector does the same thing.</p>
  
  <p>Im using it to create a video from images. If i use the array data all is well, but if i use the vector data it doesn't work.</p>
  
  <p>Any help would be highly appreciated.</p>
  
  <p>Cheers</p>