Gast
#2645214
hallo zusammen,
ich habe hier ein ganz merkwürdige Sache bei der Anwendung vom Datentyp
long long:
Compiler gcc3.4 mit uclibc 0.9.27
int main( int argc, char **argv )
{
int llsize;
long long test=0x12345678; // = 0x123456789;
llsize=sizeof( test );
printf ("longlong size=%d",llsize);
return 0;
}
Ausgabe: longlong size=8
ABER wenn ich eine Konstante (0x123456789) in der long long Variable
"test" speichern will gibts folgende Fehler vom Compiler:
"error: integer constant is too large for "long" type"
Wenn long long 8Bytes groß ist, warum kann ich dann nur max 4Bytes drin
speichern?
hat einer n Ahnung?
Danke