Take a look at this.
http://www.parashift.com/c++-faq-lit...html#faq-29.16

It seems annoying that the iomanip doesn't include anything to truncate but I think that it is impossible to implement due to problems across platforms with floating point representations. If I manually truncate in the following way I still get a strange response, consistent with that explanation. This code will give you what you want (xxxx.36) but if you step with the debugger you'll see that numDollars is now xxxx.35999999997 or something to that effect. It simply isn't possible to truncate the way you think you should be able to because in the computer it is not possible to represent 0.36 perfectly.

double numDollars = numEuros / numEurosPerDollar;
numDollars = floor(numDollars*100.0) / 100.0;
cout << "\n\n" << numEuros << " euros will convert to " << numDollars << " US dollars.\n\n";

// prints 0.36 as I expect but in the debugger value is 0.35999999999999999
double value(.36);
std::cout << "value : " << value << std::endl;