Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::fixed

 

std::fixed is a stream manipulator to set the number of digits after the comma to a fixed number.

 

#include <iostream>

int main()
{
  std::cout
    << (1.0)
    << '\n'
    << std::fixed
    << (1.0)
    << '\n';
}

 

 

 

 

 

Examples

 

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict