locale::name
저장 된 로캘 이름을 반환합니다.
string name( ) const;
반환 값
로케일 이름을 지정 하는 문자열입니다.
예제
// locale_name.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;
}
요구 사항
헤더: <locale>
네임 스페이스: std