but x has to be an integer. so do i need to recast it if doing as u suggest? also since it has to be an integer, the accuracy is only needed to an integer. i just got a warning on conversions so am trying to fix that.
Assigning a floating-point value to an integer saves only the integer part of the value.
If you want to do some rounding, you'll have to use a little arithmetic. http://www.cplusplus.com/forum/articles/3638/
Hope this helps.