(C++) std::showpoint

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) std::showpoint

 

std::showpoint is an STL stream manipulator to show the zeroes behind the comma of a double.

 

  • Download the Qt Creator project 'CppShowpoint' (zip)

 


#include <iostream> #include <iomanip> int main () {   std::cout     << std::setprecision(10)     << std::noshowpoint << 1.0 << '\n'     << std::showpoint   << 1.0 << '\n'; }

 

Screen output:

 


1 1.000000000

 

 

 

 

 

 

Contents

  1. 1#include int main () { std::cout #include &#x3C;iostream> #include &#x3C;iomanip> int main () { std::cout &#x3C;&#x3C; std::setprecision(10) &#x3C;&#x3C; std::noshowpoint &#x3C;&#x3C; 1.0 &#x3C;&#x3C; '\n' &#x3C;&#x3C; std::showpoint &#x3C;&#x3C; 1.0 &#x3C;&#x3C; '\n'; }
  2. 21 1.000000000