我有一个“unsigned int *”值,我需要将它转换为一个简单的“unsigned int”,这样我就可以将它转移到一个函数中。但是,不幸的是,当我尝试进行简单的转换时,值会发生变化:
Code:
unsigned int * addr;
...
fprintf(stdout, "=== addr: %08x ===\n", addr); fflush(stdout);
fprintf(stdout, "=== casted addr: %08x ===\n", (unsigned int)addr);
Output:
=== addr: fc880000 ===
=== casted addr: 400eff20 ===
请告诉我,如何正确转换此值,使其在转换过程中不会改变?