title: C++ Read access violation for vector
body: <p>Im getting an exception when I`m trying to use vector[int_number] and my program stop working.             </p>
  
  <pre><code>            uint64_t data = 0xffeeddccbbaa5577;
              uint16_t *vector = (uint16_t*) data;
  
              int currentPosition = 0;
  
              while (currentPosition &lt;= 3) {
  
              uint16_t header = vector[currentPosition]; // problem here
  </code></pre>
  
  <p>Visual Studio 2017 returns me:  Unhandled exception thrown: read access violation.
  vector was 0x6111F12.</p>
  
  <p>Im stuck here. If you have any idea what I should do I`ll be grateful. Thanks in advance!</p>