我正在使用树莓派并尝试使用以下内容打印 unicode 字符:
测试.cpp:
#include<iostream>
using namespace std;
int main() {
char a=L'\u1234';
cout << a << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
当我用 g++ 编译时,我收到这个警告:
test.cpp: In function "int main()":
test.cpp:4:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Run Code Online (Sandbox Code Playgroud)
输出是:
4
Run Code Online (Sandbox Code Playgroud)
此外,这不在 GUI 中,如果相关,我的发行版是 raspbian wheezy。