title: convert char* to double with max 2 places after the point
body: <p>i'm reading tokens from file, it enters the char pointers perfectly as it comes
  in the file, but after sending it to this function:</p>
  
  <pre><code>double CharToDouble(char *ptemp)
  {
   if(ptemp != NULL)
   {
    if(ptemp[0] == '0')
     return atof(ptemp);
    else
     return atof(ptemp)/100;
   }
   return 0;
  }
  </code></pre>
  
  <p>the values i'm getting in the doubles where i save this function result are like 0.6600000000001
  0.280000000000000000</p>
  
  <p>and stuff like that, i want it to be ecaxtly as in the char*..
  it's money issues, in cents.</p>
  
  <p>any idea?</p>