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.
これはばかげた質問だと思いますが、16 進コードを指定して C++ で Unicode 文字を出力する簡単な方法はありますか? 例: ❤ のコードが 0x2764 であることはわかっています。そのコードを使用して印刷する方法はありますか (printf またはストリーム上で)。
記録のために、次のように記述して文字を印刷できます。
cout << "\u2764" << endl;
ただし、変数を使用するのではなく、コンパイル時に値を知る必要があります。
ありがとう