다음을 통해 공유


basic_ios::imbue

Changes the locale.

locale imbue( 
   const locale& _Loc 
);

Parameters

  • _Loc
    A locale string.

Return Value

The previous locale.

Remarks

If rdbuf is not a null pointer, the member function calls

rdbuf->pubimbue(_Loc)

In any case, it returns ios_base::imbue(_Loc).

Example

// basic_ios_imbue.cpp
// compile with: /EHsc
#include <iostream>
#include <locale>

int main( ) 
{
   using namespace std;
   
   cout.imbue( locale( "french_france" ) );
   double x = 1234567.123456;
   cout << x << endl;
}

Requirements

Header: <ios>

Namespace: std

See Also

Reference

basic_ios Class

iostream Programming

iostreams Conventions