This documentation is archived and is not being maintained.

basic_ios::imbue 

Changes the locale.


locale imbue(
   const locale& _Loc
);

Parameters

_Loc

A locale string.

The previous locale.

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

rdbuf->pubimbue(_Loc)

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

// 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;
}

Header: <ios>

Show: