After setting the showpos and showpoint flags : double output « Data Types « C++ Tutorial






#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
  cout << "Default format: " << 123.123456789 << endl;

  cout << "Default: " << 10.0 << endl;
  cout << "After setting the showpos and showpoint flags: ";
  cout << showpos << showpoint << 10.0 << "\n\n";

  return 0;
}








2.8.double output
2.8.1.Precision of double: setprecision
2.8.2.Use a field width of 20
2.8.3.After setting the showpos and showpoint flags
2.8.4.setw manipulator is useful when repeated field
2.8.5.Return to default format