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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -