Aracılığıyla paylaş


moneypunct::pos_format

Çıkışlar pozitif tutarlar ile biçimlendirmek için bölgeye özgü kural verir.

pattern pos_format( ) const;

Dönüş Değeri

Biçimlendirme için bölgeye özgü kural pozitif tutarlar ile çıkarır.

Notlar

Üye işlevi döndüren do_pos_format.

Örnek

// moneypunct_pos_format.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 positive number format: "
        << mpunct.pos_format( ).field[0] 
        << mpunct.pos_format( ).field[1] 
        << mpunct.pos_format( ).field[2] 
        << mpunct.pos_format( ).field[3] << endl;

   const moneypunct <char, false> &mpunct2 = 
      use_facet <moneypunct <char, false> >(loc);
   cout << loc.name( ) << " domestic positive number format: "
        << mpunct2.pos_format( ).field[0] 
        << mpunct2.pos_format( ).field[1] 
        << mpunct2.pos_format( ).field[2] 
        << mpunct2.pos_format( ).field[3] << endl;
}

Örnek Çıktı

German_Germany.1252 international positive number format: $+vx
German_Germany.1252 domestic positive number format: +v $

Gereksinimler

Başlık: <locale>

Namespace: std

Ayrıca bkz.

Başvuru

moneypunct Class