Im working in C++ and I have a #define VAL 0x00000400
. when I set a variable equal to the define: int value = VAL; when I run through the debugger is shows the variable value = 1024. could someone explain how that turns into 1024? Maybe some links to memory address info, #define info, or something relevant.
0x00000400 is base 16 for 1024. Your debugger is showing you the integer value in base 10.
"0x400" is hexadecimal, or base 16. 0x400 expressed as decimal (base 10), is 1024.
By the way, you can use google to do base conversions. Search for "0x400 in decimal" and google will give you the answer.
0x00000400 is 400 base 16, which is 1024 base 10.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With