- ios[meta header]
- std[meta namespace]
- basic_ios[meta class]
- function[meta id-type]
char_type widen(char c) const;
char
型の文字を char_type
型の文字に変換する。
use_facet
<
ctype
<char_type>(
getloc
()).
widen
(c)
ストリームに設定されているロケールに従って、char
型の文字 c
を対応する char_type
型の文字に変換する。
詳細は ctype
::
widen
を参照。
#include <iostream>
int main()
{
const wchar_t c1 = std::wcout.widen('0');
const wchar_t c2 = std::wcout.widen('\\');
std::wcout << c1 << L", " << c2 << L'\n';
}
- std::wcout[link ../../iostream/wcout.md.nolink]
- widen[color ff0000]
0, \
- C++98