title: How to cast the size_t to double or int C++
body: <p>My question is that</p>
  
  <p>I have a size_t data, but now I want to convert it to double or int.</p>
  
  <p>If I do something like </p>
  
  <pre><code> size_t data = 99999999;
   int convertdata = data;
  </code></pre>
  
  <p>the compiler will report warning. because it maybe overflow.</p>
  
  <p>Do you have some method like the boost or some other method to do the convert?</p>