How to print this word "☻" in the console window?(c/c++) -
wcout.imbue(std::locale("chs")); wchar_t *a = l"☻"; wcout << *a;
it's not work, why? should do?
possible errors:
- your compiler possibly not recognising
l"☻"
unicode string in source file. - your console doesn't support it
you use unicode character code instead ("\u263b"
). make sure console supports unicode , font has corresponding character it.
it may easier (depending on compiler support) use unicode character literals c++ 11;
char a[] = u8"my \u263b character"; cout << a;
Comments
Post a Comment