Compartir a través de


moneypunct::negative_sign

Devuelve una secuencia configuración regional-específica de elementos para utilizar como símbolo de signo negativo.

string_type negative_sign( ) const;

Valor devuelto

Devuelve una secuencia configuración regional-específica de elementos para utilizar como símbolo de signo negativo.

Comentarios

La función miembro devuelve do_negative_sign.

Ejemplo

// moneypunct_neg_sign.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
#include <sstream>

using namespace std;

int main( )
{
   locale loc( "german_germany" );

   const moneypunct <char, true> &mpunct = 
      use_facet <moneypunct <char, true> >(loc);
   cout << loc.name( ) << " international negative sign: "
        << mpunct.negative_sign( ) << endl;

   const moneypunct <char, false> &mpunct2 = 
      use_facet <moneypunct <char, false> >(loc);
   cout << loc.name( ) << " domestic negative sign: "
        << mpunct2.negative_sign( ) << endl;

   locale loc2( "French" );

   const moneypunct <char, true> &mpunct3 = 
      use_facet <moneypunct <char, true> >(loc2);
   cout << loc2.name( ) << " international negative sign: "
        << mpunct3.negative_sign( ) << endl;

   const moneypunct <char, false> &mpunct4 = 
      use_facet <moneypunct <char, false> >(loc2);
   cout << loc2.name( ) << " domestic negative sign: "
        << mpunct4.negative_sign( ) << endl;
};
  

Requisitos

configuración regional <deEncabezado: >

Espacio de nombres: std

Vea también

Referencia

moneypunct (Clase)