Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 clang++ 3.2。尝试打印 (\u1D586),
cout << << endl;
但出现编译器错误:
error: expected expression cout << <U+1D586> << endl;
或者,
cout << "\u1D586" << endl;
得到不完整的输出:
ᵘ6
似乎最后的“6”没有一起解释。
是什么原因以及如何解决这个问题?
\u后跟 4 个十六进制数字,在您的情况下,您应该使用\U后跟 8 个十六进制数字\U0001D586。
\u
\U
\U0001D586