Namespaces
Variants
Views
Actions

std::ios_base::precision

From cppreference.com
< cpp‎ | io‎ | ios base
Revision as of 16:40, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dcl ">

<td >
streamsize precision() const;
</td>

<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td >
streamsize precision( streamsize new_precision );
</td>

<td > (2) </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Manages the precision (i.e. how many digits are generated) of certain numeric output conversions.

1) Returns the current precision.

2) Sets the precision to the given one.

Contents

Parameters

new_precision - new precision setting

Return value

the precision before the call to the function

Example

See also

Template:cpp/io/ios base/dcl list width