title: C++ long long manipulation
body: <p>Given 2 32bit ints iMSB and iLSB</p>
  
  <pre><code>int iMSB = 12345678; // Most Significant Bits of file size in Bytes
  int iLSB = 87654321; // Least Significant Bits of file size in Bytes
  </code></pre>
  
  <p>the long long form would be...</p>
  
  <pre><code>// Always positive so use 31 bts
  long long full_size =  ((long long)iMSB &lt;&lt; 31);
            full_size += (long long)(iLSB);
  </code></pre>
  
  <p>Now..</p>
  
  <p>I don't need that much precision (that exact number of bytes), so, how can I convert the file size to MiBytes to 3 decimal places and convert to a string...</p>
  
  <p>tried this...</p>
  
  <pre><code>long double file_size_megs = file_size_bytes / (1024 * 1024);
  char strNumber[20];
  sprintf(strNumber, "%ld", file_size_megs);
  </code></pre>
  
  <p>... but dosen't seem to work.</p>
  
  <p>i.e. 1234567899878Bytes = 1177375.698MiB  ??</p>