title: Casting an array of unsigned chars to an array of floats
body: <p>What is the best way of converting a unsigned char array to a float array in c++?</p>
  
  <p>I presently have a for loop as follows</p>
  
  <pre><code>for (i=0 ;i&lt; len; i++)
      float_buff[i]= (float) char_buff[i];
  </code></pre>
  
  <p>I also need to reverse the procedure, i.e convert from unsigned char to float (float to 8bit conversion)</p>
  
  <pre><code>for (i=0 ;i&lt; len; i++)
      char_buff[i]= (unsigned char) float_buff[i];
  </code></pre>
  
  <p>Any advice would be appreciated</p>
  
  <p>Thanks</p>