eigtl. einfache frage zu bit-operatoren
-
Vertexwahn schrieb:
in C++98 seihts so aus: es ist nicht sicher ob ein char unsigend oder signed ist - was sagt da C99 dazu (ich glaube das selbe - womit die interne Bitstellung dann anders als Wert interpretiert wird)?
c99 schrieb:
The three types char, signed char and unsigned char are collectively called the character types. The implementation shall define char to have the same range, representation and behavior as either signed char or unsigned char.[35]
[35]CHAR_MIN, defined in <limits.h>, will have one of the values 0 or SCHAR_MIN, and this can be used to distinguish the two options. Irrespectively of the choice made, char is a separate type from the other two and is not compatible with either.
-
blubb schrieb:
und da ich nur auf x86 arbeite is mir das ladde
wo ist denn ein int nicht 4 byte gross?
ZB unter DOS (16 Bit).
-
groovemaster schrieb:
Und zweitens sind char, signed char und unsigned char 3 unterschiedliche Typen. char kann je nach Implementation entweder signed oder unsigned sein.
Man lernt nie aus