@@ -479,11 +479,11 @@ using namespace std;
479
479
int main ( )
480
480
{
481
481
locale loc ( "German_Germany" );
482
- int result1 = use_facet<codecvt<char, char, mbstate_t> > ( loc ).encoding ( );
482
+ int result1 = use_facet<codecvt<char, char, mbstate_t>> ( loc ).encoding ( );
483
483
cout << result1 << '\n';
484
- result1 = use_facet<codecvt<wchar_t, char, mbstate_t> > ( loc ).encoding( );
484
+ result1 = use_facet<codecvt<wchar_t, char, mbstate_t>> ( loc ).encoding( );
485
485
cout << result1 << '\n';
486
- result1 = use_facet<codecvt<char, wchar_t, mbstate_t> > ( loc ).encoding( );
486
+ result1 = use_facet<codecvt<char, wchar_t, mbstate_t>> ( loc ).encoding( );
487
487
cout << result1 << '\n';
488
488
}
489
489
```
@@ -581,7 +581,7 @@ int main( )
581
581
wchar_t* pwszNext;
582
582
mbstate_t state = {0}; // zero-initialization represents the initial conversion state for mbstate_t
583
583
locale loc("C");//English_Britain");//German_Germany
584
- int res = use_facet<codecvt<wchar_t, char, mbstate_t> >
584
+ int res = use_facet<codecvt<wchar_t, char, mbstate_t>>
585
585
( loc ).in( state,
586
586
pszExt, &pszExt[strlen(pszExt)], pszNext,
587
587
pwszInt, &pwszInt[strlen(pszExt)], pwszNext );
@@ -657,10 +657,10 @@ using namespace std;
657
657
#define LEN 90
658
658
int main( )
659
659
{
660
- char* pszExt = "This is the string whose length is to be measured!";
660
+ const char* pszExt = "This is the string whose length is to be measured!";
661
661
mbstate_t state = {0}; // zero-initialization represents the initial conversion state for mbstate_t
662
- locale loc("C");// English_Britain");//German_Germany
663
- int res = use_facet<codecvt<wchar_t, char, mbstate_t> >
662
+ locale loc("C"); // English_Britain"); //German_Germany
663
+ int res = use_facet<codecvt<wchar_t, char, mbstate_t>>
664
664
( loc ).length( state,
665
665
pszExt, &pszExt[strlen(pszExt)], LEN );
666
666
cout << "The length of the string is: ";
@@ -703,7 +703,7 @@ using namespace std;
703
703
int main ( )
704
704
{
705
705
locale loc( "C");//English_Britain" );//German_Germany
706
- int res = use_facet<codecvt<char, char, mbstate_t> >
706
+ int res = use_facet<codecvt<char, char, mbstate_t>>
707
707
( loc ).max_length( );
708
708
wcout << res << '\n';
709
709
}
0 commit comments