Was passiert hier???? float als hex?
-
code:
double f=4.1,f1=5.1; printf("%x %x\n",f,f1);
ergebnis:
0x66666666 0x66666666
wieso????
das gleiche prob. mit float
-
Äh. Welches "Problem"?
Du sagst printf hier dass nach dem String als nächste Parameter zwei ints kommen, übergibst aber zwei double. Das Ergebnis ist Mist. Was hast Du erwartet?
-
double f=64.1, f1=5.1; printf("%I64x %I64x\n",*(__int64*)&f,*(__int64*)&f1);