次の方法で共有


numpunct::grouping

数字は、小数点の左側にグループ化するかを判断するためのロケール固有の規則を返します。

string grouping( ) const;

戻り値

数字は、小数点の左側にグループ化するかを判断するためのロケール固有の規則。

解説

このメンバー関数は do_groupingを返します。

使用例

// numpunct_grouping.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
#include <sstream>
using namespace std;
int main( )
{
   locale loc( "german_germany");

   const numpunct <char> &npunct = 
       use_facet < numpunct <char> >( loc );
   for (unsigned int i = 0; i < npunct.grouping( ).length( ); i++)
   {
      cout << loc.name( ) << " international grouping:\n the "
           << i <<"th group to the left of the radix character "
           << "is of size " << (int)(npunct.grouping ( )[i]) 
           << endl;
   }
}
  

必要条件

ヘッダー: <locale>

名前空間: std

参照

関連項目

numpunct Class