A
A
whats the difference?
A said:whats the difference?
Both are different integral types defined in the standard, the latter added
in C++x11. While wchar_t is intended to store information in a format that
depends on the locale, char16_t appears to have been defined with the
specific purpose of encoding information following the UTF-16 format (as
char32_t with the UTF-32 format).
So, in practical terms, the main difference is that by using char16_t and
char32_t you specifically know what format is being used to encode your text
strings, while with wchar_t you don't.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.