title: How to copy uint8* to vector<Uint8> correctly
body: <p>I am trying to make a vector of Uint8 from  Uint8*, but for reason some of the values are not same. Here is my code. </p>
  
  <pre><code>std::vector&lt;Uint8&gt; wav_vector = {}; 
  Uint8* wav_buffer_;   
  for (unsigned int i = 0; i &lt; wav_length_; i++) {
    wav_vector.push_back(wav_buffer_[i]);
  }
  </code></pre>
  
  <p>Then later I am trying to verify the values: </p>
  
  <pre><code>for (unsigned int i = 0; i &lt; wav_length_; i++){
      if (wav_buffer_[i]!=wav_vector[i]){
        cout&lt;&lt;i&lt;&lt;endl;
        printf("Orignal Buffer %u\n", wav_buffer_[i]);
        printf("Vector Buffer %u\n", wav_vector[i]);
  
      }
    }
  </code></pre>
  
  <p>These are my sample outputs:</p>
  
  <pre><code>Index: 0
  Orignal Buffer 208
  Vector Buffer 40
  
  Index: 1
  Orignal Buffer 72
  Vector Buffer 3
  
  Index: 2
  Orignal Buffer 111
  Vector Buffer 183
  
  Index: 3
  Orignal Buffer 1
  Vector Buffer 97
  
  Index: 4
  Orignal Buffer 0
  Vector Buffer 79
  
  Index: 5
  Orignal Buffer 0
  Vector Buffer 127
  
  Index: 8
  Orignal Buffer 120
  Vector Buffer 40
  
  Index: 9
  Orignal Buffer 251
  Vector Buffer 3
  
  Index: 10
  Orignal Buffer 182
  Vector Buffer 183
  
  Index: 16
  Orignal Buffer 0
  Vector Buffer 176
  
  Index: 17
  Orignal Buffer 0
  Vector Buffer 200
  
  Index: 18
  Orignal Buffer 0
  Vector Buffer 109
  
  Index: 19
  Orignal Buffer 0
  Vector Buffer 1
  
  Index: 24
  Orignal Buffer 0
  Vector Buffer 176
  
  Index: 25
  Orignal Buffer 0
  Vector Buffer 200
  
  Index: 26
  Orignal Buffer 0
  Vector Buffer 109
  
  Index: 27
  Orignal Buffer 0
  Vector Buffer 1
  
  Index: 32768
  Orignal Buffer 16
  Vector Buffer 120
  </code></pre>
  
  <p>Any help would be really appreciated. </p>
  
  <p>Note: 
  I tried this and it works. But I want to do using for loop as I have some other audio formats which will require bit shifting. </p>
  
  <pre><code>std::vector&lt;Uint8&gt; wav_vector(&amp;wav_buffer_[0], &amp;wav_buffer_[wav_length_]);
  </code></pre>