C++ Basic Type Keywords char16_t

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

C++11

An unsigned integer type with the same size and alignment as uint_least16_t, which is therefore large enough to hold a UTF-16 code unit.

const char16_t message[] = u"你好,世界\n";            // Chinese for "hello, world\n"
std::cout << sizeof(message)/sizeof(char16_t) << "\n"; // prints 7


Got any C++ Question?