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"