dec to hex

Posts 1–9 of 9 · Page 1 of 1
dec to hex
RESOLVED
thanks all
A number is a number no matter what base it uses.
well c++ wont let me use the number that i have so i have to make it a cooler number but idk how
Google decimal to hex and use a free converter
yea but i need a one that i can implement into my c++ code and is compatible with a dll.
Your OS -> Calculator.

The way your compiler interpretes it is up to your compiler.

0x Prefix = Most used in cpp. In VBCrap "H" is the Hex tag, Etc.

A Number is a Number, Just use it the right way so it is compiled the right way, I haven't slept / Drank a bit too much wine to even bother explaining, But if you had read your book as you should have I wouldn't be there typing this.

Edit:
Re-Read your thingy.
Err.
For an App, A Number is a Number, Hex, Dec, Etc are only ways to print/show it, It will compute the same way regardless of the tag as it is saved in memory, What are you exactly trying to do ?. I just don't get it.

Read your book again, Answer question yourself.
Not c++ is the problem! The problem is in your brain...


Now to the explanation:

1. The numbers are always safed the same.
Code:
0x123456 (hex)

= 6*16^0 + 5*16^1 + 4*16^2 + 3*16^3 + 2*16^4 + 1*16^5 (dez)
= 1193046 (dez)

= 4432126 (okt)
2. They're all safed in your memory (if you use a 32 Bit - 4 Byte Integer) like this:

Code:
00000000 00010010 00110100 01010110
in BINARY!!!

so i think that i should use it the way i intended without worrying about how it was printed to a txt file?
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us