title: Casting int on a c++ logic layer
body: <p>I am new to c++ and as for now I have quite a heavy task on my work, I have a gui made in wpf and I need to send parameters from the gui to the c++ the (which as for now I already handled)
  <br>My problem is that on the c++ layer I get the info as a BYTE* I need to reinterprete the values to their "original" state (the first translation from ont\float to byte array is being made on the C# level using the static BitConvertor class) as for now I used this little method - <br></p>
  
  <pre><code>void GetNextValue(byte* bytes, deque&lt;BYTE&gt; *buffer)
  {
      bytes[3] = buffer-&gt;front(); 
      buffer-&gt;pop_front();
      bytes[2] = buffer-&gt;front(); 
      buffer-&gt;pop_front();
      bytes[1] = buffer-&gt;front(); 
      buffer-&gt;pop_front();
      bytes[0] = buffer-&gt;front(); 
      buffer-&gt;pop_front();
  } 
  </code></pre>
  
  <p>But for an integer value of 1 I get a really high number, on the other hand going directly for the int value in the whole buffer will yield the correct answer...(i.e. int x = pBuffer[4]), any help or suggestions will be gladly accepted..</p>
  
  <p>BTW-
  I used </p>
  
  <pre><code>_rxBuffer.insert( _rxBuffer.end(), pBuffer, pBuffer + nLength);
  </code></pre>
  
  <p>To convert the BYTE* of data to -</p>
  
  <pre><code>deque&lt;BYTE&gt; _rxBuffer;
  </code></pre>