Namespace
Varianti

std::money_put

Da cppreference.com.
< cpp‎ | locale

 
 
Localizzazioni libreria
Impostazioni internazionali e sfaccettature
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
Carattere classificazione
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.
Conversioni
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet categoria classi di 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.
Facet categorie
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.
Locale specifici aspetti
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.
Codice di conversione sfaccettature
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
Membri funzioni
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 incapsula le regole per la formattazione di valori monetari come stringhe. Lo standard di I / O std::put_money manipolatore utilizza l'aspetto std::money_put del locale I / O stream.
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
Informazioni sull'immagine

Inheritance diagram

Indice

[modifica] Tipo requisiti

-
InputIt must meet the requirements of InputIterator.

[modifica] Specializzazioni

Due specializzazioni e due specializzazioni parziali sono fornite dalla libreria standard e sono attuate da tutti gli oggetti delle impostazioni locali creati in un programma 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>
crea rappresentazioni di stringa strette di valori monetari
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>
crea rappresentazioni di stringa a livello di valori monetari
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>
crea rappresentazioni di stringa strette di valori monetari a iteratore di output personalizzato
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>
crea rappresentazioni di stringa a livello di valori monetari a iteratore di output personalizzato
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.

[modifica] Membri tipi

Membro tipo
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
char_type CharT
string_type std::basic_string<CharT>
iter_type OutputIt

[modifica] Membri funzioni

costruisce un nuovo aspetto money_put
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.

(membro pubblico funzione)
distrugge un aspetto 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.

(protetto funzione membro)
Invoca 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.

(membro pubblico funzione)

[modifica] Protetto funzioni membro

[virtuale]
formati di un valore monetario e scrive al flusso di output
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.

(virtuale protetto funzione membro)

[modifica] Membri oggetti

static std::locale::id id
' Id del locale
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.

(membro oggetto pubblico)

[modifica] Esempio

#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';
}

Output:

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

[modifica] Vedi anche

definisce i parametri di formattazione monetari utilizzati da std::money_get e 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 template) [edit]
analizza e costruisce un valore monetario da una sequenza di caratteri di input
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 template) [edit]
(C++11)
i formati e le uscite di un valore monetario
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.

(funzione di modello)