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