Megosztás a következőn keresztül:


<iomanip> get_money

Extracts a monetary value from a stream using the desired format, and returns the value in a parameter.

template<class Money>
    T7 get_money(
        Money& _Amount, 
        bool _Intl
);

Parameters

  • _Amount
    The extracted monetary value.

  • _Intl
    If true, use international format. The default value is false.

Property Value/Return Value

Returns the stream str.

Remarks

The manipulator returns an object that, when extracted from the stream str, behaves as a formatted input function that calls the member function get for the locale facet money_get associated with str, using _Intl to indicate international format. If successful, the call stores in _Amount the extracted monetary value. The manipulator then returns str.

Money must be of type long double or an instantiation of basic_string with the same element and traits parameters as str.

Requirements

Header: <iomanip>

Namespace: std

See Also

Reference

<iomanip>

iostream Programming

iostreams Conventions