Freigeben über


locale::classic

Die statische Memberfunktion gibt einem Gebietsschemaobjekt zurück, das das klassische C-Gebietsschema darstellt.

static const locale& classic( );

Rückgabewert

Ein Verweis auf das C-Gebietsschema.

Hinweise

Im klassischen C-Gebietsschema ist das US-englische ASCII-Gebietsschema in der C-Standardbibliothek, implizit in Programmen verwendet wird, nicht die internationalisiert werden.

Beispiel

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

using namespace std;

int main( ) 
{
   locale loc1( "german" );
   locale loc2 = locale::global( loc1 );
   cout << "The name of the previous locale is: " << loc2.name( )
        << "." << endl;
   cout << "The name of the current locale is: " << loc1.name( ) 
        << "." << endl;

   if (loc2 == locale::classic( ) )
      cout << "The previous locale was classic." << endl;
   else
      cout << "The previous locale was not classic." << endl;

   if (loc1 == locale::classic( ) )
      cout << "The current locale is classic." << endl;
   else
      cout << "The current locale is not classic." << endl;
}
  

Anforderungen

Gebietsschema Header: <>

Namespace: std

Siehe auch

Referenz

locale-Klasse