title: Byte array to int in C++
body: <p>Would the following be the most efficient way to get an int16 (short) value from a byte array?</p>
  
  <pre><code>inline __int16* ReadINT16(unsigned char* ByteArray,__int32 Offset){
      return (__int16*)&amp;ByteArray[Offset];
  };
  </code></pre>
  
  <p>If the byte array contains a dump of the bytes in the same endian format as the machine, this code is being called on. Alternatives are welcome.</p>