Home c++ CHAR16_T and CHAR32_T Symbols output

CHAR16_T and CHAR32_T Symbols output




The object object in C++ displays only numeric values ​​of the literals of Types CHAR16_T and CHAR32_T . What needs to be done to display the character data types into the console?

Answer 1, Authority 100%

To do this, add the output streams for these types. At the moment there is no such possibility in C++.

Currently, if the console supports UTF-8, you can convert the source characters in UTF-8 and output them.

Answer 2

Converting WCHAR_T:

# include & lt; iostream & gt;
Int Main (int argc, char * argv [])
  char16_t v = 42;
  STD :: WCOUT & LT; & LT; static_cast & lt; wchar_t & gt; (v) & lt; & lt; STD :: ENDL;
  Return 0;

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions