std::moneypunct_byname
De cppreference.com
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
| Definido en el archivo de encabezado <locale>
|
||
template< class charT, bool Intl = false > class moneypunct_byname : public std::moneypunct<charT, Intl>; |
||
std::moneypunct_byname es una faceta std::moneypunct que encapsula las preferencias de formato monetario de una configuración regional especificada en su construcción .
Original:
std::moneypunct_byname is a std::moneypunct facet which encapsulates monetary formatting preferences of a locale specified at its construction.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Dos especializaciones son proporcionados por la biblioteca estándar
Original:
Two specializations are provided by the standard library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Definido en el archivo de encabezado
<locale> | |
std::moneypunct_byname<char, Intl>
|
específico de entorno nacional faceta std::moneypunct carácter estrecho para I / O
Original: locale-specific std::moneypunct facet for narrow character I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
std::moneypunct_byname<wchar_t, Intl>
|
específico de entorno nacional faceta std::moneypunct para caracteres anchos I / O
Original: locale-specific std::moneypunct facet for wide character I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Tipos de miembros
Miembro de 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 |
pattern
|
std::money_base::pattern |
string_type
|
std::basic_string<charT>
|
Las funciones miembro
construye una nueva faceta moneypunct_byname Original: constructs a new moneypunct_byname facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro pública) | |
destructs una faceta moneypunct_byname Original: destructs a moneypunct_byname facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro protegida) |
Ejemplo
Este ejemplo demonistrates cómo aplicar las reglas de formato monetario de otro idioma sin cambiar el resto de la configuración regional .
Original:
This example demonistrates how to apply monetary formatting rules of another language without changing the rest 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.
You can help to correct and verify the translation. Click here for instructions.
Ejecuta este código
#include <iostream>
#include <iomanip>
#include <locale>
int main()
{
long double mon = 1234567;
std::locale::global(std::locale("en_US.utf8"));
std::wcout.imbue(std::locale());
std::wcout << L"american locale : " << std::showbase
<< std::put_money(mon) << '\n';
std::wcout.imbue(std::locale(std::wcout.getloc(),
new std::moneypunct_byname<wchar_t>("ru_RU.utf8")));
std::wcout << L"american locale with russian moneypunct: "
<< std::put_money(mon) << '\n';
}
Salida:
american locale : $12,345.67
american locale with russian moneypunct: 12 345.67 руб
Ver también
| Define los parámetros de formato monetario utilizados por std::money_get y std::money_put. (plantilla de clase) |