title: C++ How to read Bytes as Integer endianness independent?
body: <p>i want to read some Bytes of my File as an Integer Value. For Example the file contains the value <code>0x000003BB</code> which equals 955.</p>
  
  <p>I could read the data this way:</p>
  
  <pre><code>ifstream input ("C:/Desktop/myFile", ios::binary);
  uint8_t buffer[4] = {0};
  input.read((char*)buffer, sizeof(buffer));
  </code></pre>
  
  <p>But how can i convert the buffer-array to the corresponding int-value 955? And if possible in a endianness independent way, because this and some other Files in Big Endian Byte Order but my system are on Little Endian Byte Order. Thanks :)</p>