title: How would I put 4 chars into a single int?
body: <p>I am working on a replica GM buffer system in C++ to get familiar with bits and such, and it's not bad, but I've run into a problem. How do I push 4 different chars into an int? I am not the best at bitwise stuff, I've never used it. I've got no idea how to.</p>
  
  <p>In the thing, I have an array of chars; of size <code>byteArraySize</code> and when I call the grab int function, it would take the bytes from <code>bufferPointer + 4</code> to <code>bufferPointer</code>; backwards to grab the int properly.</p>
  
  <p>I read a <strong>bit</strong> on bitshifting (lol), and I thought I could like bitshift every char's bits <code>i</code> to the right. I've just got no clue where to start.</p>
  
  <p>Any help is greatly appreciated.</p>