(C++) std::noshowpoint
January 9, 2018 · View on GitHub
(C++) std::noshowpoint
std::noshowpoint is an STL stream manipulator to not show the zeroes behind the comma of a double.
#include <iostream> #include <iomanip> int main () { std::cout << std::setprecision(10) << std::showpoint << 1.0 << '\n' << std::noshowpoint << 1.0 << '\n'; }
Screen output:
1.000000000 1