cppannotations/annotations/yo/first/wchar.yo
Frank B. Brokken adac2cda2e fixed typos
2017-06-08 11:08:25 +02:00

9 lines
532 B
Text

The ti(wchar_t) type is an extension of the tt(char) built-in type, to accommodate
em(wide) character values (but see also the next section). The tt(g++)
compiler reports tt(sizeof(wchar_t)) as 4, which easily accommodates all 65,536
different em(Unicode) character values.
Note that bf(Java)'s tt(char) data type is somewhat comparable to bf(C++)'s
tt(wchar_t) type. bf(Java)'s tt(char) type is 2 bytes wide, though. On the
other hand, bf(Java)'s tt(byte) data type is comparable to bf(C++)'s tt(char)
type: one byte. Confusing?