title: Using SetPrecision incorrectly
body: <p>With the following 2 functions focus on the rows with the * comments. When the cout&lt;&lt; statement executes, there is no decimal place showing. 3021680380 /10000000 turns into 302. instead of 302.1680.</p>
  
  <pre><code>void convert(){
      setprecision(4);   //************************
      newFileTime = new double[numRec];   //***********
      newOffset = new int[numRec];
      newSize = new int[numRec];
      newNum = new int[numRec];
      newType = new int[numRec];
      newTime = new int[numRec];
  
      for(int i = 0; i&lt;numRec; i++){
          newFileTime[i] = fileTime[i] / 10000000; //**********
          newOffset[i] = offset[i] / 512;
          newSize[i] = fileSize[i] / 512;
          newNum[i] = 0;
          if(type[i] == "Write"){
              newType[i] = 0;
          }else{
              newType[i] = 1;
          }
          newTime[i] = responseTime[i] / 10000000;
      }
  }
  
  void exports(){
      setprecision(4);  //**************
      ofstream fout;
      fout.open("prxy_0.ascii");
      {
      if(!fout){
              cout &lt;&lt;"File opening failed. \n";
          }
      }
      fout&lt;&lt; numRec &lt;&lt;endl;
  
      for(int i = 0; i &lt; numRec; i++){
          fout&lt;&lt; newFileTime[i] &lt;&lt; " " &lt;&lt; newNum[i] &lt;&lt; " " &lt;&lt; newOffset[i] &lt;&lt; " " &lt;&lt; newSize[i] &lt;&lt; " " &lt;&lt; newType[i] &lt;&lt; " " &lt;&lt; newTime[i];
          cout&lt;&lt; fileTime[i] &lt;&lt; " " &lt;&lt; newFileTime[i] &lt;&lt;endl; //**********
          if(i != numRec - 1){
              fout&lt;&lt;endl;
          }
      }
      fout.close();
  }
  </code></pre>
  
  <p>Any ideas?</p>