what is difference between char, uchar and uchar16?
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
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
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 am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010
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.Originally Posted by cpjust
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Not if the defining library wants to be cross-platform.
(Besides, there is no such thing as unsigned wchar_t.)
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
hmm... yes, wchar_t is not a signed integer type.Originally Posted by CornedBee
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)