I have a vector container. There are a number from 0 to 255. The data bytes are top (of the container). On the fourth day begins mantissa and it may consist of several numbers, for example. Mantissa consists of <120, 111, 200>. That is, it is the number of machine: <0x78, 0x6F, 0xC8>. Total turn mantissa: 0x786FC8.
I can convert because of the method:
- Set the number of 120, 111, 200 in hexadecimal.(0x78, 0x6F, 0xC8)
- Put the numbers in line.("78" "6F" "C8")
- Fold the line.("786FC8")
- Move back to an integer type. 0x786FC8
Q: Is there any way you do it faster and without strings?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…