title: c++ pull signed integer from specific index in char array
body: <p>I have this line of code that I'm thinking may not be the greatest:</p>
  
  <pre><code>get_entity_id () {
    return ntohl(*(int*)(&amp;data_[ENTITY_ID_INDEX]));
  }
  </code></pre>
  
  <p>data_ is char[] and ENTITY_ID_INDEX is the position in the data_ where the integer is stored.</p>
  
  <p>This compiles and seems to work fine, but I'm wondering if there is a 'better' way to do it. I'm using C++14, if it matters.</p>