|
|
char dont store 0 to 255 it store -127 to -127 |
and of course this is not a good idea |
you must use static_cast |
char dont store 0 to 255 it store -127 to -127 !! |
Plain char, signed char, and unsigned char are three distinct types. A char, a signed char, and an unsigned char occupy the same amount of storage and have the same alignment requirements (3.9); that is, they have the same object representation. For character types, all bits of the object representation participate in the value representation. For unsigned character types, all possible bit patterns of the value representation represent numbers. These requirements do not hold for other types. In any particular implementation, a plain char object can take on either the same values as a signed char or an unsigned char; which one is implementation-defined. |
codemonkey, i did not understand anything you said i think its some kind of advanced thing you are talking about... |
|
|