I want to compile a C++ application and I must not use
#include <iomanip>
Is there any alternative way to do that?
Info: I need the setprecision to be 5
Yes you have the ability to use
cout.precision(5);
This does not require
#include <iomanip>
Note: This will set precision for the whole document.
Example:
cout.precision(5);
cout << f;
You can set the precision()
directly on the stream, e.g.:
std::cout.precision(5);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With