std::fixed, std::scientific, std::hexfloat, std::defaultfloat
Template:cpp/io/manip/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td><ios>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td ><td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">
<td ><td > (2) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">
<td ><td > (3) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td > (4) </td> <td > (since C++11) </td> </tr> Template:ddcl list end
Modifies the default formatting for floating-point I/O
1) sets the floatfield
of the stream str
to fixed
as if by calling Template:cpp
2) sets the floatfield
of the stream str
to scientific
as if by calling Template:cpp
3) sets the basefield
of the stream str
to fixed
and scientific
simultaneously (this enables hexadecimal floating-point formatting) as if by calling Template:cpp
4) sets the basefield
of the stream str
to zero, as if by calling Template:cpp
This is an I/O manipulator, it may be called with an expression such as Template:cpp for any out
of type Template:cpp or with an expression such as Template:cpp for any in
of type Template:cpp.
Contents |
Parameters
str | - | reference to I/O stream |
Return value
str
(reference to the stream after manipulation)