I am trying to round a double to 3 decimalplaces like this example.
The output will be 12.345 but when I am compiling the program it says:
´floor´: identifier not found.
Perheps I have to #include a class for this and if, which one can be used for this ?
Code:double d = 12.3446; d = floor(d * 1000.0 + 0.5 ) / 1000.0;