wchar t

一个足够大的整数类型,表示支持的最大扩展字符集的所有字符,也称为宽字符集。 (假设 wchar_t 使用任何特定编码,例如 UTF-16,这是不可移植的。)

它通常在你需要将字符存储在 ASCII 255 上时使用,因为它的字符大小比字符类型 char 大。

const wchar_t message_ahmaric[] = L"ሰላም ልዑል\n"; //Ahmaric for "hello, world\n"
const wchar_t message_chinese[] = L"Hello World\n";// Chinese for "hello, world\n"
const wchar_t message_hebrew[]  = L"שלום עולם\n"; //Hebrew for "hello, world\n"
const wchar_t message_russian[] = L"Привет мир\n";  //Russian for "hello, world\n"
const wchar_t message_tamil[]   = L"ஹலோ உலகம்\n"; //Tamil for "hello, world\n"