Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
Miscellaneous
complex
exception
functional
iterator
limits
locale
memory
new
numeric
stdexcept
typeinfo
utility
valarray
locale
has_facet
isalnum
isalpha
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
locale
tolower
toupper
use_facet
standard facets:
codecvt
codecvt_base
codecvt_byname
collate
collate_byname
ctype
ctype_base
ctype_byname
messages
messages_base
messages_byname
moneypunct
moneypunct_byname
money_base
money_get
money_put
numpunct
numpunct_byname
num_get
num_put
time_base
time_get
time_get_byname
time_put
time_put_byname
num_put
num_put::num_put
public member functions:
num_put::put
public member types:
num_put::char_type
num_put::iter_type
protected members:
num_put::do_put
num_put::~num_put


num_put

class template
<locale>
template <class charT, class OutputIterator = ostreambuf_iterator<charT> > class num_put;

Facet to format numeric values

num_put

The num_put standard facet is used to format numeric values as sequences of characters. It is called by standard output streams (such as ostream) to format numerical values with the insert operator (<a href="../../../iostream/ostream/operator<<.html">operator<<</a>).

num_put objects are prevented to be locally constructed by having a protected destructor. Only those installed in locale objects should be used through mechanisms such as use_facet.

This template class has two template parameters, representing the character type and the iterator type. They are referred in this entire reference as charT and OutputIterator, respectively:
 
template <class charT, class OutputIterator = ostreambuf_iterator<charT> > num_put;


The class defines two member alias types for these types: num_put::char_type and num_put::iter_type, respectively.

The character type is the type of the characters to generate.

The iterator type is the type of the output iterators pointing to the beginning and final elements in a character sequence.
Notice that this defaults to the ostreambuf_iterator type for the first template parameter charT, although the template can be instantiated for any other type of output iterator.

Public members

It includes the following public member functions:

Along with the following public member types:

Virtual protected members