what is difference between char, uchar and uchar16?
Printable View
what is difference between char, uchar and uchar16?
char is a standard type. uchar and uchar16 are not, so who knows what they are defined as (I would guess unsighed char and unsigned short respectively, but it's impossible to say for sure, as it could REALLY be just about anything).
--
Mats
uchar is the unsigned version of char.
i think they are both standard types.
uchar 16 may be it is only a "typedef" of unsigned short.
it could refer into a header file like "uchar.h" -- may be.
check it out.
http://www.cppreference.com/wiki/data_types
uchar & uchar16 are not standard types, but unless they are named extremely badly, they are typedefs for unsigned char and unsigned short (assuming short is 16 bits on that platform).
I guess uchar16 is for storing UNICODE char.
about the uchar, I have seen it in "sqlext.h", the SQLCHAR is unsigned char in fact. maybe it will be used to store a byte ranging from 0 to 255.
It is also feasible that uchar16 might be a typedef for (unsigned) wchar_t.Quote:
Originally Posted by cpjust
Not if the defining library wants to be cross-platform.
(Besides, there is no such thing as unsigned wchar_t.)
hmm... yes, wchar_t is not a signed integer type.Quote:
Originally Posted by CornedBee