title: C++ unsigned int to double conversion
body: <p>What is the right way of converting <code>unsigned int</code> to <code>double</code>? I need this is for <code>QCPCustomPlot</code> for data setting, as it takes in <code>QVector&lt;double&gt;</code> <strong>precisely</strong> as parameter for creating a graph.</p>
  
  <p>EDIT: Silly me. The 'memory leak' error issue was caused because I initialised <code>QVector&lt;double&gt; x(time), y(ipv4int)</code> wrongly. Changed the <code>time</code> value to the same as <code>ipv4int</code> (the data occurence frequency) and the <code>x</code> and <code>y</code> matched correctly. </p>
  
  <p>Done with the <code>time</code> variable, now the actual issue regarding the conversion. How can I convert it to <code>double</code> format that holds value such as <code>1855919686</code> instead of in the format of <code>1.85592e+09</code>?</p>
  
  <p>QCustomPlot requires <code>double</code> but it seems that the <code>QVector&lt;double&gt;</code> couldn't take in value like 1.85592e+09</p>
  
  <p>Updated code:</p>
  
  <pre><code>QVector&lt;double&gt; x(i), y(totalIP); //i=236052
  for(int o = 0; o &lt;= i; o++){
      double dSec = arrayIPxTime[o][0] - startSecond; //arrayIPTime[o][0] holds time in second
      double dMin = dSec/60;
      double ipv4addr = arrayIPxTime[o][1]; //arrayIPTime[o][0] holds ipaddr in integer format
      x[o] = dMin;
      //y[o] = ipv4addr; this is the line that causes crash. 
      qDebug()&lt;&lt;"Count "&lt;&lt;o&lt;&lt;" time "&lt;&lt; x[o] &lt;&lt;" ipv4 "&lt;&lt;ipv4addr&lt;&lt;" arrayIPxTime[o][1] "&lt;&lt;arrayIPxTime[o][1];
  }
  </code></pre>
  
  <p>Current output:</p>
  
  <pre><code>Count  236048  time  62.3167  ipv4  1.85592e+09  arrayIPxTime[o][1]  1855919686
  Count  236049  time  62.3167  ipv4  1.85592e+09  arrayIPxTime[o][1]  1855919686
  Count  236050  time  62.3167  ipv4  1.85592e+09  arrayIPxTime[o][1]  1855919686
  Count  236051  time  62.3167  ipv4  1.85592e+09  arrayIPxTime[o][1]  1855919686
  </code></pre>