小编lkj*_*dsa的帖子

打印 unicode 字符 c++ linux

我正在使用树莓派并尝试使用以下内容打印 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。

c++ linux unicode raspberry-pi

0
推荐指数
1
解决办法
4541
查看次数

标签 统计

c++ ×1

linux ×1

raspberry-pi ×1

unicode ×1