Difference between revisions of "cpp/io/manip/get money"
From cppreference.com
(+) |
m (intl makes currency required) |
||
Line 13: | Line 13: | ||
{{param list begin}} | {{param list begin}} | ||
{{param list item | mon | variable where monetary value will be written. Can be either {{cpp|long double}} or {{cpp|basic_string}}}} | {{param list item | mon | variable where monetary value will be written. Can be either {{cpp|long double}} or {{cpp|basic_string}}}} | ||
− | {{param list item | intl | expects to find | + | {{param list item | intl | expects to find required international currency strings if {{cpp|true}}, expects optional currency symbols otherwise}} |
{{param list end}} | {{param list end}} | ||
Revision as of 13:44, 11 January 2012
Defined in header <iomanip>
|
||
template< class MoneyT > /*unspecified*/ get_money( MoneyT& mon, bool intl = false ); |
(since C++11) | |
When used in an expression Template:cpp, parses the character input as a monetary value, as specified by the Template:cpp facet of the locale currently imbued in in
, and stores the value in mon
.
This function behaves as a formatted input function.
Contents |
Parameters
mon | - | variable where monetary value will be written. Can be either Template:cpp or Template:cpp |
intl | - | expects to find required international currency strings if Template:cpp, expects optional currency symbols otherwise |
Return value
Returns an object of unspecified type such that if in
is the name of an output stream of type Template:cpp, then the expression Template:cpp behaves as if the following code was executed: