Nope, it's not static_cast. It's the approximation of double. When you
assign 1.15 to a double variable, that varaible will actually contain an
approximation of 1.15 (Something like 1.1499999...) That's why when you
multiply that variable by 100 it will contain 114.999999999 not 115, then
assigning it to an integer would truncate the fraction.
Now the question is why does cout output the value "correctly"? Because it
rounds double to the nearest precision (which can be set using
std::setprecision()), for example consider:
cout<< std::setprecision(20) << 1.15 << endl;
it would print 1.149999...
Hope that helps,