2021年4月3日星期六

Convert buffer to int

#include <iostream>    int main()  {      std::cout << "Hello World!\n";      unsigned char aaa[4] = { 0xAA, 0xB9, 0x70, 0xB5};      int j = 0xB570B9AA;      int i = (int) &aaa[0];      printf("%08x", i);  }  

Output: Hello World! 0057f814

i not equal to 0xB570B9AA

Anything wrong?

https://stackoverflow.com/questions/66937924/convert-buffer-to-int April 04, 2021 at 12:04PM

没有评论:

发表评论