次の方法で共有


codecvt::max_length

1 CharType内部の生成に必要な外部 [byte]、の最大数を返します。

int max_length( ) const throw( );

戻り値

1 CharTypeの生成に必要な [byte]、の最大数。

解説

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

使用例

// codecvt_max_length.cpp
// compile with: /EHsc
#define _INTL
#include <locale>
#include <iostream>
using namespace std;

int main( )   
{
   locale loc( "C");//English_Britain" );//German_Germany
   int res = use_facet<codecvt<char, char, mbstate_t> >
     ( loc ).max_length( );
   wcout << res << endl;
}
  

必要条件

ヘッダー: <locale>

名前空間: std

参照

関連項目

codecvt Class