title: C++ shifting bits
body: <p>I am new to shifting bits, but I am trying to debug the following snippet:</p>
  
  <pre><code>if (!(strcmp(arr[i].GetValType(), "f64")))
   {
          dem_content_buff[BytFldPos] = tmp_data;
       dem_content_buff[BytFldPos + 1] =  tmp_data &gt;&gt; 8;
       dem_content_buff[BytFldPos + 2] = tmp_data &gt;&gt; 16;
       dem_content_buff[BytFldPos + 3] = tmp_data &gt;&gt; 24;
       dem_content_buff[BytFldPos + 4] = tmp_data &gt;&gt; 32;
       dem_content_buff[BytFldPos + 5] = tmp_data &gt;&gt; 40;
       dem_content_buff[BytFldPos + 6] = tmp_data &gt;&gt; 48;
       dem_content_buff[BytFldPos + 7] = tmp_data &gt;&gt; 56;
          }    
  </code></pre>
  
  <p>I am getting a warning saying the lines with "32" to "56" have a shift count that is too large.  The "f64" in the predicate just means that the data should be 64bit data.</p>
  
  <p>How should this be done?</p>
  
  <p>edit:</p>
  
  <p>I should have put more of the code in.</p>
  
  <pre><code>tmp_data = simulated_data[index_data];
  
  if (!(strcmp(dems[i].GetValType(), "s32")))
  </code></pre>
  
  <p>{
       dem_content_buff[BytFldPos] = tmp_data;
       dem_content_buff[BytFldPos + 1] = tmp_data >> 8;
       dem_content_buff[BytFldPos + 2] = tmp_data >> 16;
       dem_content_buff[BytFldPos + 3] = tmp_data >> 24;<br>
   }</p>
  
  <p>if (!(strcmp(dems[i].GetValType(), "f64")))
   {
          dem_content_buff[BytFldPos] = tmp_data;
       dem_content_buff[BytFldPos + 1] = tmp_data >> 8;
       dem_content_buff[BytFldPos + 2] = tmp_data >> 16;
       dem_content_buff[BytFldPos + 3] = tmp_data >> 24;
       dem_content_buff[BytFldPos + 4] = tmp_data >> 32;
       dem_content_buff[BytFldPos + 5] = tmp_data >> 40;
       dem_content_buff[BytFldPos + 6] = tmp_data >> 48;
       dem_content_buff[BytFldPos + 7] = tmp_data >> 56;
   }     </p>
  
  <p>So, <code>dem_content_buff</code> right now only holds ints.  Can I not use this array for the 64 bit data either?</p>