You can use the -fshort-wchar g++ option to force the wchar_t size to two bytes.
您可以使用-fshort-wchar g++选项将 wchar_t 的大小强制规定为两个字节。
A string is equivalent to a sequence of char, while a wstring represents a sequence of wchar.
string等价于char的序列,而wstring表示wchar的序列。
Char or wchar conventions determine the size of the element types with string represented by 8-bit quantities and wstring 16-bit or greater.
char或wchar约定确定了类型为string的元素大小由8个字节表示,wstring类型的元素大小是16个字节或更多。
Char or wchar conventions determine the size of the element types with string represented by 8-bit quantities and wstring 16-bit or greater.
char或wchar约定确定了类型为string的元素大小由8个字节表示,wstring类型的元素大小是16个字节或更多。
应用推荐