Espaces de noms
Variantes
Affichages
Actions

std::money_put

De cppreference.com
< cpp‎ | locale

 
 
Bibliothèque localisations
Locales et facettes
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
Classification des caractères
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversions
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes de facettes catégorie de base
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Catégories de facettes
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Spécifique aux paramètres régionaux facettes
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facettes de conversion de code
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8 (C++11)
codecvt_utf16 (C++11)
C locale
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
std::money_put
Les fonctions membres
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
money_put::money_put
money_put::~money_put
money_put::put
money_put::do_put
 
Defined in header <locale>
template<

    class CharT,
    class OutputIt = std::ostreambuf_iterator<CharT>

> class money_put;
Classe std::money_put encapsule les règles de formatage des valeurs monétaires sous forme de chaînes. Le manipulateur std::put_money E / S standard utilise la facette std::money_put de la localisation du flux d'E / S .
Original:
Class std::money_put encapsulates the rules for formatting monetary values as strings. The standard I/O manipulator std::put_money uses the std::money_put facet of the I/O stream's locale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cpp/locale/locale/facetstd-money put-inheritance.svg
À propos de cette image

Inheritance diagram

Sommaire

[modifier] Exigences de type

-
InputIt must meet the requirements of InputIterator.

[modifier] Spécialisations

Deux spécialisations et deux spécialisations partielles sont fournies par la bibliothèque standard et sont mises en œuvre par tous les objets créés dans un environnement linguistique programme C + +:
Original:
Two specializations and two partial specializations are provided by the standard library and are implemented by all locale objects created in a C++ program:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <locale>
std::money_put<char>
crée une chaine de caractères étroits de valeurs monétaires
Original:
creates narrow string representations of monetary values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<wchar_t>
crée une chaine de caractères larges de valeurs monétaires
Original:
creates wide string representations of monetary values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<char, OutputIt>
crée une chaine de caractères étroits de valeur monétaire en utilisant un itérateur de sortie personnalisé
Original:
creates narrow string representations of monetary values using custom output iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<wchar_t, OutputIt>
crée une chaine de caractères larges de valeur monétaire en utilisant un itérateur de sortie personnalisé
Original:
creates wide string representations of monetary values using custom output iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Types de membres

Type du membre Définition
char_type CharT
string_type std::basic_string<CharT>
iter_type OutputIt

[modifier] Fonctions membres

construit un nouveau money_put facette
Original:
constructs a new money_put facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)
Détruit une facette money_put
Original:
destructs a money_put facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre protégée)
Invoque do_put
Original:
invokes do_put
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique)

[modifier] Protégé fonctions membres

[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
formate une valeur monétaire et écrit dans le flux de sortie
Original:
formats a monetary value and writes to output stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre virtuelle protégée)

[modifier] Objets membres

static std::locale::id id
Id de la localisation
Original:
id of the locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(objet membre public)

[modifier] Exemple

#include <iostream>
#include <locale>
#include <iomanip>
#include <iterator>
int main()
{
    // using the IO manipulator
    std::cout.imbue(std::locale("en_US.UTF-8"));
    std::cout << "american locale: "
               << std::showbase << std::put_money(12345678.9)<< '\n';
 
    // using the facet directly
    std::cout.imbue(std::locale("de_DE"));
    std::cout << "german locale: " ;
    std::ostreambuf_iterator<char> out(std::cout);
    auto& f = std::use_facet<std::money_put<char>>(std::cout.getloc());
    f.put(out, false, std::cout, std::cout.fill(), 12345678.9 );
    std::cout << '\n';
}

Résultat :

american locale: $123,456.79
german locale: 123.456,79 EUR

[modifier] Voir aussi

définit les paramètres de mise en forme monétaire utilisés par std::money_get et std::money_put
Original:
defines monetary formatting parameters used by std::money_get and std::money_put
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique) [edit]
analyse et construit une valeur monétaire à partir d'une séquence de caractères d'entrée
Original:
parses and constructs a monetary value from an input character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique) [edit]
(C++11)
formats et des sorties d'une valeur monétaire
Original:
formats and outputs a monetary value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction générique)