I'm new to C++. I have a double variable double a=0.1239857 and I want to limit variable a from decimal point two digits. So a will be 0.12. I know C++ have functions that return largest or smallest integer that is greater or lower than a like ceil or floor.
Is there a function that implements digit limitation of floating-point variable? Or How can I change precision of the a variable?